List of utility methods to do Json String Create
String | toJsonField(String name, String value) to Json Field return "\"" + name + "\":\"" + value + "\""; |
String | toJsonName(String name, int prefixLen) Convert given name to the Json object name. return Character.toLowerCase(name.charAt(prefixLen)) + name.substring(prefixLen + 1);
|
String | toJsonUrl(String pUrl) to Json Url if (pUrl.endsWith(".xml")) { throw new IllegalArgumentException("HttpHelper was passed a Uri which explicitly " + "asked for a different format: '" + pUrl + "'!"); if (pUrl.endsWith("/")) { pUrl = pUrl.substring(0, pUrl.length() - 1); if (!pUrl.endsWith(".json")) { ... |
String | toJSONValue(Enum> e) to JSON Value if (e == null) { return null; return e.name(); |
void | write2Json(String json, String path, String name) write Json File pathFile = new File(path); if (!pathFile.isDirectory()) { throw new FileNotFoundException(); if (!pathFile.exists()) { pathFile.mkdirs(); if (name == null) { ... |