Changes

Jump to navigation Jump to search
155 bytes removed ,  14:38, 16 April 2019
=Conventions=
 
{{Mark|Updated with Version 9.0}}:
All functions and errors in this module are assigned to the <code><nowiki>http://basex.org/modules/json</nowiki></code> namespace, which is statically bound to the {{Code|json}} prefix.<br/>
The resulting representation consumes less memory than XML-based formats, and values can be directly accessed without conversion. Thus, it is recommendable for very large inputs and for efficient ad-hoc processing.
 
Before {{Version|9.0}}, the format was called {{Code|map}} (it has been renamed because the resulting value may also be a string, number, boolean, or an empty sequence).
==Options==
|-
| width='120' | '''Signatures'''
|{{Func|json:parse|$input string as xs:string?|elementitem(json)?}}<br/>{{Func|json:parse|$input string as xs:string?, $options as map(xs:string, xs:string*)?|item()?}}
|-
| '''Summary'''
|Converts the JSON data specified by {{Code|$inputstring}} to an XQuery value. If the input can be successfully parsed, it can be serialized back to the original JSON representation. The {{Code|$options}} argument can be used to control the way the input is converted.
|-
| '''Errors'''
|-
| width='120' | '''Signatures'''
|{{Func|json:serialize|$input as item()?|xs:string}}<br/>{{Func|json:serialize|$input as item()?, $options as map(xs:string, xs:string*)?|xs:string}}
|-
| '''Summary'''
|Serializes the specified {{Code|$input}} as JSON, and returns using the result as specified {{Code|xs:string$options}} instance. , and returns the result as string:* The input is expected to conform to the results that are created by [[#json:parse|json:parse()]]. * Non-conforming items will be serialized as specified for in the [[XQuery 3.1#JSON Serialization|json output method]] of the official specificationrecommendation.<br />Items Values can also be serialized as JSON if with the standard [[Serialization|Serialization Parameter]] feature of XQuery:* The parameter {{Code|method}} is needs to be set to {{Code|json}}.<br/>The , and* the options presented in this article need to be assigned to the {{Code|$optionsjson}} argument can be used to control the way the input is serializedparameter.
|-
| '''Errors'''
=Errors=
 
{{Mark|Updated with Version 9.0}}:
{| class="wikitable" width="100%"
=Changelog=
 
; Version 9.1
* Updated: [[#json:parse|json:parse]] can be called with empty sequence.
;Version 9.0
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu