<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.fromJsonString.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.fromJsonString</api:function-name><api:suggest>xdmp.fromjsonstring</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>fromjsonstring</api:suggest><api:function-link mode="xquery" fullname="xdmp:from-json-string">/apidoc/8.0/xdmp:from-json-string.xml</api:function-link><api:function mode="javascript" name="fromJsonString" type="builtin" lib="xdmp" category="Extension" subcategory="JSON" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.fromJsonString"><api:summary>
  Parses a string as JSON, returning an item sequence.
</api:summary><api:params><api:param name="arg" type="xs:string"><api:param-description>
    JSON input to be parsed.
  </api:param-description><api:param-name>arg</api:param-name><api:param-type>String</api:param-type></api:param></api:params><api:return>ValueIterator</api:return><api:usage>
  <p xmlns="http://www.w3.org/1999/xhtml">A JSON object or string is parsed as a <code>json:object</code>.</p>
  <p xmlns="http://www.w3.org/1999/xhtml">The JSON null value is represented as the empty sequence, and serializes
  in a way that indicates it is a null value.  Therefore, when the null value
  is returned to JSON via <code>xdmp:to-json</code>, the null value is
  preserved.</p>
  <p xmlns="http://www.w3.org/1999/xhtml">Nested arrays in JSON are turned into nested sets of
  <code>json:array</code>s.</p>
  <p xmlns="http://www.w3.org/1999/xhtml">Any codepoints in the JSON string that aren't allowed in XML are
     rejected and an error is thrown.</p>
</api:usage><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.fromJsonString('["a", null, false]');
=&gt;
["a",null,false]
</pre></api:example></api:function></api:function-page>