.. highlight:: us .. index:: json_simple .. _json_simple: json_simple =========== .. us.tag json_simple json New6800 :ref:`json_simple` converts a valid json string into a UniScript object. .. function:: o = json_simple(ssjson) .. us.return **Return Value** *o* is a json tree or an Error object (see :ref:`error_create`). :: o = json_simple( "{\"a\":1, \"b\":2}"); [. a = 1, b = 2, ] json_simple("{\"a\": [1,2,3]}"); [. a[1;3] = [1, 2, 3] ] json_simple("[1, \"text\", true, false, null, {\"a\":1}, [2,3]]"); [. [1] = 1, [2] = "text", [3] = 1, [4] = 0, [5] = 1e+10, [6] = [. a = 1, ], [7][1;2] = [2, 3] ] s = "{" .. +"\"name\": \"John\"," .. +"\"age\": 30," .. +"\"married\": false," .. +"\"children\": null," .. +"\"skills\": [\"UniPlot\", \"UniScript\", \"JSON\"]" .. +"}"; o = json_simple(s); [. age = 30, children = 1e+10, married = 0, name = "John", skills[1;3] = ["UniPlot", "UniScript", "JSON"], ] .. us.params **Parameters** .. uparam:: ssjson *ssjson* is a valid json string. .. us.comment **Comment** The :ref:`json_simple` function * Converts null to 1e10 (missing values) * Stores arrays of objects into key/object pairs * Converts *True* to *1* and *False* to *0* .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2026.0 - New. .. seealso:: :ref:`Overview-json` :sub:`id-667216`