public class XMLToJSONObjectMapper extends JSONObjectMapper implements Mapper<org.json.JSONObject>
Mapper that loads the contents of a valid XML Source
(e.g.: file, URL) and converts it into a JSONObject (using json.org
reference implementation).
Because of differences between XML and JSON formats, the document structure may suffer modifications in this transformation:
JSONArray.
Note: Conversion from XML to JSON may vary depending on the
Mapper implementation.
| Constructor and Description |
|---|
XMLToJSONObjectMapper() |
| Modifier and Type | Method and Description |
|---|---|
org.json.JSONObject |
apply(InputStream inputStream) |
configurationHelperequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconfigurationHelperpublic org.json.JSONObject apply(InputStream inputStream) throws IOException
apply in interface Mapper<org.json.JSONObject>apply in class JSONObjectMapperIOExceptionCopyright © 2021. All rights reserved.