How to convert or cast hashmap to JSON object in Java, and again convert JSON object to JSON string?
You can use:
new JSONObject(map);
Caution: This will only work for a Map<String, String>!
Other functions you can get from its documentation
http://stleary.github.io/JSON-java/index.html
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments