• ng.eval_json is not available in the Lite version

Object ng.eval_json (String json, [Boolean secure = false]) vs. 1.1.0 FULL ONLY

Evaluate a JSON string into a JavaScript object. If this function provokes a JavaScript parser error (such as "SCRIPT1014: Invalid character", the input text does not comply with JSON syntax. To correct the error, do one of the following:
  • Modify the text argument to comply with JSON syntax.
  • Make sure that the text argument was serialized by a JSON-compliant implementation, such as ng.make_json(obj).

Parameters

String json Required vs. 1.1.0 Full+Lite
A valid JSON string. Must comply with JSON syntax. For more information, see the BNF syntax notation of JSON objects.
Boolean secure (Optional - Default: false) vs. 1.1.0 Full+Lite
Is the JSON string from a trused source or not, default is false. If the JSON string is from an unknown source, this parameter should be set to false.

Return

Object vs. 1.1.0 Full+Lite

The JavaScript object that represents the JSON string.

Examples

Using ng.eval_json(json, secure)
Demo: