jsonParse.php
Table of Contents
Functions
- jsonParse() : string
- Return an AQL value described by the JSON-encoded input string.
Functions
jsonParse()
Return an AQL value described by the JSON-encoded input string.
jsonParse(string $text) : string
This helper wraps the ArangoDB AQL function JSON_PARSE(text) which parses
a JSON string and returns the corresponding AQL value. This is useful for
converting JSON strings back into native AQL data types.
Example AQL usage:
JSON_PARSE('{"name": "John"}') // returns {name: "John"}
JSON_PARSE('[1, 2, 3]') // returns [1, 2, 3]
JSON_PARSE('"hello"') // returns "hello"
JSON_PARSE('true') // returns true
Parameters
- $text : string
-
JSON string expression to parse.
Tags
Return values
string —The formatted AQL expression.