What is "ObjectRootElementName" used for in the JSONtoXML policy?

The schema for the JSONtoXML policy lists "ObjectRootElementName" as an option. What is that option used for?

Here is the schema:

https://github.com/apigee/api-platform-samples/blob/master/schemas/policy/json_to_xml.xsd

Thanks,

Stephen

Solved Solved
0 2 144
1 ACCEPTED SOLUTION

Former Community Member
Not applicable

@sgilson

It is used the set the Root Element name when you convert from JSON (which doesn't have a named root element) to XML. For ex:

{
  "abc": 123,
  "efg": 234
}

Will yield

<Root>
   <abc>123</abc>
   <efg>234</efg>
</Root>

I have opened a defect with the docs team to add an explanation for this.

View solution in original post

2 REPLIES 2

Former Community Member
Not applicable

@sgilson

It is used the set the Root Element name when you convert from JSON (which doesn't have a named root element) to XML. For ex:

{
  "abc": 123,
  "efg": 234
}

Will yield

<Root>
   <abc>123</abc>
   <efg>234</efg>
</Root>

I have opened a defect with the docs team to add an explanation for this.