← Back to context Comment by CapitaineToinon 4 days ago That's the default output when using json_encode with the JSON_PRETTY_PRINT flag in php. 2 comments CapitaineToinon Reply idoubtit 4 days ago > That's the default output when using json_encode with the JSON_PRETTY_PRINT flag in php.JSON_PRETTY_PRINT is irrelevant. Escaping slashes is the default behavior of json_encode(). To switch it off, use JSON_UNESCAPED_SLASHES. CapitaineToinon 4 days ago Ah, my bad. Thanks for the correction, TIL!
idoubtit 4 days ago > That's the default output when using json_encode with the JSON_PRETTY_PRINT flag in php.JSON_PRETTY_PRINT is irrelevant. Escaping slashes is the default behavior of json_encode(). To switch it off, use JSON_UNESCAPED_SLASHES. CapitaineToinon 4 days ago Ah, my bad. Thanks for the correction, TIL!
> That's the default output when using json_encode with the JSON_PRETTY_PRINT flag in php.
JSON_PRETTY_PRINT is irrelevant. Escaping slashes is the default behavior of json_encode(). To switch it off, use JSON_UNESCAPED_SLASHES.
Ah, my bad. Thanks for the correction, TIL!