string json_encode($var)

$var - the variable to encode as a JSON string

This function is supported only in CSE HTML Validator v14.0206 and later.

Visit www.json.org for more information about JSON, a lightweight data-interchange format.