json - XSD Setup for Arrays -
i have nested json array follows:
when try post getting error messages:
{"restfaultelement":{"summary":"translation failure.\nfailed translate json xml. java.io.ioexception: array start inside array\nthe incoming data not conform nxsd schema. please correct problem.\n","code":null,"detail":null}}
"options": { "co-ordinates": { "x": "594752", "y": "714430" }, "language": "english", "pagesize": "a4", "scale": "1,000", "orientation": "landscape", "geometrydata": { "type": "polygon", "rings": [ [ [ 716102.6700605, 733105.7692149 ], [ 716431.41550966, 733105.7692149 ], [ 716431.41550966, 732878.22709315 ], [ 716102.6700605, 732878.22709315 ], [ 716102.6700605, 733105.7692149 ] ] ], "_ring": 0, "spatialreference": { "wkid": 2157, "latestwkid": 2157 }, "cache": { "_extent": { "xmin": 717192, "ymin": 733058.86, "xmax": 717424, "ymax": 733230.86, "spatialreference": { "wkid": 2157, "latestwkid": 2157 } }, "_partwise": "partwise", "_centroid": { "type": "point", "x": 717308.00000013, "y": 733144.86000007, "spatialreference": { "wkid": 2157, "latestwkid": 2157 } } } }
the problem part of seems "rings" array. believe 1 of 2 things happening: 1. json syntax wrong. 2. xsd file set wrong.
the xsd segments should accept element defined as:
<xsd:element type="xsd:decimal" name="rings"/>
would set allow array passed it?
thank you.
you missing brackets @ start end end of string. try:
{"rings": [ [ [ 716102.6700605, 733105.7692149 ], [ 716431.41550966, 733105.7692149 ], [ 716431.41550966, 732878.22709315 ], [ 716102.6700605, 732878.22709315 ], [ 716102.6700605, 733105.7692149 ] ] ]}
Comments
Post a Comment