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 ?
To the people having trouble with json-lib and GJson.enhanceClasses(). Try GJson.enhanceString() instead.
GJson.enhanceString() def o = "{\"x\": 20.0}" as JSONObject