Error Messages/44402

Example Error Message

In the call to MakeJSON, the indexes In1 and In2 appear in both the «indexOrder» parameter and the «objects» parameter, but their relative ordering is inconsistent. In one of the parameters, In1 comes before In2, and in the other In2 comes before In1.

Description

You have a call such as

ParseJSON(x, indexOrder:In1,In2, objects:In2,In1 )

It would be okay for In1 and In2 to appear in both parameters as long as the ordering is consistent. But it would also be unnecessary, because you would be specifying that both indexes are to produce JSON objects, so there would be no need to include them in the «indexOrder» parameter. Hence, you could use just

ParseJSON(x, objects:In2,In1 )

to specify that In1 is the inner object, In2 is the outer object.

Sometimes an index does need to appear in both -- specifically when you transcribe a 2-D (or more) array into a JSON array of objects, or JSON object of arrays. In that case, the index that will produce the JSON object needs to appear both places, so that the ordering in «indexOrder» identifies whether the array or the object in on the outside.

See Also

Comments


You are not allowed to post comments.