Example:
def json = new JsonBuilder() json name: "Guillaume", age: 33 assert json.toString() == '{"name":"Guillaume","age":33}'
891011121314151617
* Created by dteo on 10/05/2014. */ public class MapToJson { public static String convert(Map map) { JsonBuilder json = new JsonBuilder(); json.call(map); return json.toPrettyString(); } }