Table of Contents

Search

  1. Preface
  2. Part 1: Using Process Developer
  3. Part 2: Creating and Modifying Processes
  4. Part 3: Functions, Events, Errors, and Correlation
  5. Part 4: Testing and Deployment
  6. Part 5: Process Central and Process Server (On-Premises)

Process Developer

Process Developer

jsonToXml(jsonString)

jsonToXml(jsonString)

Convert the JSON string to an XML element. This string can represent for an array.
The following examples show how four different array representations are transformed into XML:
  • The root element and the value is a JSON object.
    JSON
    :
    {"foo":{"name":"foo","desc":"foo desc"}}
    XML
    :
    <foo desc="foo desc" name="foo"/>
  • The root element and the value is an array. A wrapper object element containing a sequence of elements representing the values of the array is created.
    JSON:
    {"foo":[{"name":"foo","desc":"foo desc"},{"name":"foo2","desc":"foo2 desc"}]}
    XML:
    <json:object xmlns:json="http://schemas.activebpel.org/JSON/2013/10/10/aeJSON.xsd"> <foo desc="foo desc" name="foo"/> <foo desc="foo2 desc" name="foo2"/> </json:object>
  • A root object exists but there is no root element. The JSON object is wrapped into an object element.
    JSON:
    {"name":"foo","desc":"foo desc"}
    XML:
    <json:object xmlns:json="http://schemas.activebpel.org/JSON/2013/10/10/aeJSON.xsd" desc="foo desc" name="foo"/>
  • A root array exists but there is no root element. The array is wrapped in an array element and each object becomes a sequence of object elements.
    JSON:
    [{"name":"foo","desc":"foo desc"},{"name":"foo2","desc":"foo2 desc"}]
    XML:
    <json:array xmlns:json="http://schemas.activebpel.org/JSON/2013/10/10/aeJSON.xsd"> <json:object desc="foo desc" name="foo" /> <json:object desc="foo2 desc" name="foo2" /> </json:array>

0 COMMENTS

We’d like to hear from you!