Re: Stripping a JSON of extra characters in PHP
Arno Welzel <[email protected]> Sun, 5 Feb 2023 00:28:48 +0100
| Newsgroups | comp.lang.php |
|---|---|
| Message-ID | <[email protected]> |
Ben Bacarisse, 2023-02-04 00:56: > Arno Welzel <[email protected]> writes: > >> Ben Bacarisse, 2023-02-01 17:09: >> >>> [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). >> >> First of all - to all of you: learn how to use validators and >> beautifiers. > > You think I don't? Now that you've got that off your chest, what's the > second thing we -- all of us -- need to learn? ;-) What I told you. Then you could have seen, that the invalid example only missed a comma. -- Arno Welzel https://arnowelzel.de