WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

Endpoint
Name:json.JSONToXML
Description:
Id:json.JSONToXML
Category:accessor
Identifier Syntax

json.JSONToXML is an accessor using Active URI syntax with the following base identifiers:

Base
active:JSONToXML

and the following arguments: (for more details on argument passing details see here)

ArgumentRulesTypingDescription
operand
Mandatory
Representation (JSONObject)input JSON Object
operator
Optional
Representation (HDS)configuration
Request Verbs

The following verb is supported:

Verb
SOURCE
Response

The following response representations can be returned for SOURCE requests:

SOURCE Representations
java.lang.String

This accessor throws no documented exceptions.

Import Requirements

To use json.JSONToXML accessor you must import the module urn:org:netkernel:json:core:

<import>
  <uri>urn:org:netkernel:json:core</uri>
</import>

Example

This JSON resource...

{"root":
	{
		"a": "1",
		"b": "2"
	}
}

will be converted to the following XML form...

<root>
  <a>1</a>
  <b>2</b>
</root>

Operator

The optional operator argument supplies configuration to the conversion

<config>
  <addRootElement>true</addRootElement>
</config>

  • addRootElement - adds a root tag so that json without a root object will create well formed XML.