Re: Stripping a JSON of extra characters in PHP
"J.O. Aho" <[email protected]> Sat, 4 Feb 2023 11:23:23 +0100
| Newsgroups | comp.lang.php |
|---|---|
| Message-ID | <[email protected]> |
On 01/02/2023 17:09, Ben Bacarisse wrote: > [email protected] (The Doctor) writes: > >> From https://developer.moneris.com/livedemo/checkout/preload_req/guide/dotnet >> >> I need a JSON as follows: >> >> { >> "store_id":"moneris", >> "api_token":"hurgle", > > What you pasted as what you "need" is not even valid JSON and has a huge > number of pointless spaces in it making it almost unreadable (in my news > client). > I don't know what it is you mean. As I saw it, the OP post was more about the formatting of the json that is generated than about if his json was correct or not, he wants a multi line json with indentations instead of a single line compressed json. -- //Aho