JSON to Groovy parser

后端 未结 5 2120
暗喜
暗喜 2020-12-25 13:14

I found many things about converting Groovy to JSON, but oddly enough, not the other way.

What is the (best) JSON to Groovy parser around there ?

5条回答
  •  北海茫月
    2020-12-25 13:57

    To the people having trouble with json-lib and GJson.enhanceClasses(). Try GJson.enhanceString() instead.

    GJson.enhanceString()
    def o = "{\"x\": 20.0}" as JSONObject
    

提交回复
热议问题