Product SiteDocumentation Site

Chapter 11. Error codes

The JSONiq error codes are summarized here.
jerr:JNDY0003
It is a dynamic error if two pairs in an object constructor or in a simple object union have the same name.
jerr:JNTY0004
Arrays and objects cannot be atomized. It is a type error to call fn:data on a sequence containing an array or an object.
jerr:JNUP0005
It is a dynamic error if a pending update list contains two JSON insert update primitives on the same object and pair name.
jerr:JNUP0006
It is a dynamic error if upd:applyUpdates causes an object to contain two pairs with the same name.
jerr:JNUP0007
It is a type error if, in an updating expression, an array selector cannot be cast to xs:integer or if an object selector cannot be cast to xs:string.
jerr:JNUP0008
It is a dynamic error if the target of a JSON delete or JSON replace expression is not an array or an object. It is a dynamic error if the target of a renaming expression is not an object. It is a dynamic error if the target of an appending expression is not an array. It is a dynamic error if the target of a position-inserting expression is not an array. It is a dynamic error if the target of a non-position-inserting expression is not an object.
jerr:JNUP0009
It is a dynamic error if a pending update list contains two JSON replacing update primitives on the same object or array, and with the same selector.
jerr:JNUP0010
It is a dynamic error if a pending update list contains two JSON renaming update primitives on the same object and with the same selector.
jerr:JNTY0011
It is a type error if the content sequence in a node constructor or in an XQUF insert or replace update expression contains an object or an array.
jerr:JNSE0012
It is a dynamic error to serialize something else than a unique JSON item with the JSON output method if the jsoniq-multiple-top-level-items is set to no.
jerr:JNSE0014
It is a dynamic error to serialize a function, a node or a standalone atomic item with the JSON output method.
jerr:JNSE0015
It is a dynamic error to serialize a top-level item which is not a JSON item if the jsoniq-multiple-top-level-items serialization parameter is not set to "array".
jerr:JNUP0016
It is a dynamic error if it is attempted to create a replace, delete or rename update primitive with a selector that cannot be resolved against the target array or object.
jerr:JNTY0018
It is a type error if there is not exactly one supplied parameter for an object or array selector.
jerr:JNUP0019
It is a dynamic error if the content expression, in an object insert expression, does not evaluate to a sequence of objects.
jerr:JNTY0020
It is a dynamic error if, when calling jn:parse-json, the option "jsoniq-multiple-top-level-items" is not a boolean.
jerr:JNDY0021
It is a dynamic error if parsing a string to one or several objects or arrays is not successful, or if it results in more than one item and "jsoniq-multiple-top-level-items" is false.
jerr:JNSE0022
It is a dynamic error if an object or array is encountered upon serializing as XML, XHTML, HTML or Text.
jerr:JNTY0023
It is a dynamic error if, when calling jn:decode-from-roundtrip, the type specified in an Encoded Object is not recognized, or if the value cannot be cast to it (if it is an atomic type) or if the parsed XML node does match it (if it is an XML node type).
jerr:JNTY0024
Arrays and objects do not have a string value. It is a type error to call fn:string on an array or an object.