Re: Stripping a JSON of extra characters in PHP
Ben Bacarisse <[email protected]> Sun, 05 Feb 2023 00:06:05 +0000
| Newsgroups | comp.lang.php |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
Arno Welzel <[email protected]> writes: > 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. What a relief to know that you'd already imparted the first /and second thing/ we all need to learn. I feared I would not have the time to learn enough to keep posting! > Then you could have seen, that the invalid example only > missed a comma. Yes, I spotted that too. You'll never guess how... -- Ben.