MCPcopy Index your code
hub / github.com/VolmitSoftware/Adapt / toJSONObject

Method toJSONObject

src/main/java/com/volmit/adapt/util/JSONML.java:267–269  ·  view source on GitHub ↗

Convert a well-formed (but not necessarily valid) XML string into a JSONObject using the JsonML transform. Each XML tag is represented as a JSONObject with a "tagName" property. If the tag has attributes, then the attributes will be in the JSONObject as properties. If the tag contains children, the

(XMLTokener x)

Source from the content-addressed store, hash-verified

265 * @return A JSONObject containing the structured data from the XML string.
266 */
267 public static JSONObject toJSONObject(XMLTokener x) throws JSONException {
268 return (JSONObject) parse(x, false, null);
269 }
270
271 /**
272 * Convert a well-formed (but not necessarily valid) XML string into a

Callers

nothing calls this directly

Calls 1

parseMethod · 0.95

Tested by

no test coverage detected