(Object o)
| 12 | } |
| 13 | |
| 14 | public static String toJSONString(Object o) { |
| 15 | if (o instanceof String) { |
| 16 | return '"' + ((String) o).replace("\\", "\\\\").replace("\"", "\\\"") + '"'; |
| 17 | } |
| 18 | if (o instanceof Long) { |
| 19 | return o + "L"; |
| 20 | } |
| 21 | return o.toString(); |
| 22 | } |
| 23 | |
| 24 | public static JSONMap parseMap(String json) { |
| 25 | return new JSONParser(json).map(); |