Do necessary escaping to output JSON.
public static escapeJson ( mixed $data, array $options = [] ) : string | ||
$data | mixed | The data to JSON-ify. |
$options | array | Additional options: - nodelimit: (boolean) Don't add security delimiters? DEFAULT: false - urlencode: (boolean) URL encode the json string DEFAULT: false |
return | string | The escaped string. |