jsonStringify.php
Table of Contents
Functions
- jsonStringify() : string
- Return a JSON string representation of the input value.
Functions
jsonStringify()
Return a JSON string representation of the input value.
jsonStringify(mixed $value) : string
This helper wraps the ArangoDB AQL function JSON_STRINGIFY(value) which
converts an AQL value into its JSON string representation. This is useful
for serializing AQL data types to JSON format.
Example AQL usage:
JSON_STRINGIFY({name: "John"}) // returns '{"name":"John"}'
JSON_STRINGIFY([1, 2, 3]) // returns '[1,2,3]'
JSON_STRINGIFY("hello") // returns '"hello"'
JSON_STRINGIFY(true) // returns 'true'
Parameters
- $value : mixed
-
AQL value expression to convert to JSON string.
Tags
Return values
string —The formatted AQL expression.