We have to create an interface with a lot of responses in JSON format according to JSON API specification https://jsonapi.org/ . There is new Workflow service XmlJsonConvertService
with service method TypedXml2Json
which can generate JSON without ROOT and Datastructure Name element. But its use in API Data Page is really complicated. The steps are:
- prepare the data in XML (transformation WF step)
- use the
XmlJsonConvertService
(with omit Root and Main element set totrue
) to convert the XML data to pure JSON - you need a temporary context with DataType String as output - transform that temporary context to Datastructure with
SD
entity ands1
field - Use the transformation in API Data Page to transform the
SD
withs1
field to pure JSON with ResultXPath set.
It would be great if the OmitMainElement parameter could be set in API Data Page, so you need only one click, otherwise it is a lot of modeling.
Thanks.