logoalt Hacker News

CapitaineToinonyesterday at 3:15 PM1 replyview on HN

That's the default output when using json_encode with the JSON_PRETTY_PRINT flag in php.


Replies

idoubtityesterday at 4:44 PM

> 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.

show 1 reply