JSON mapping with XDATA
There is an example on JSON XDATA.
But it only describes Name mapping.
Is it possible to define somehow also a structural mapping
e..g an Array of Arrays Structure: without property names
[
[12,33], [88,44]
]
Product version: IRIS 2022.3
Discussion (1)1
Comments
ClassMethod GetContentJSON()
{
set xData = ##class(%Dictionary.CompiledXData).%OpenId(..%ClassName(1) _ "||Content")
set jsonObj = [].%FromJSON(xData.Data)
write jsonObj.%ToJSON()
}
XData Content [ MimeType = application/json ]
{
[[12,33], [88,44]]
}