public class JsonUtils
extends Object
JSON-related utility functions.
-
Constructor Summary
Constructors
-
Method Summary
Write object to JSON file.
static org.json.JSONObject
Converts an XML string to a JSON object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
JsonUtils
public JsonUtils()
-
Method Details
-
xmlToJson
public static org.json.JSONObject xmlToJson(String xml)
Converts an XML string to a JSON object.
-
saveObjectAsJson
Write object to JSON file.
- Parameters:
filenameBase
- Filename without the .json extension
- Throws:
Exception
-