Path: csiph.com!pasdenom.info!porbandar.httrack.net!news.httrack.net!2.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.php Subject: Re: Stripping a JSON of extra characters in PHP Date: Sun, 5 Feb 2023 00:28:48 +0100 Lines: 34 Message-ID: References: <875yclmkpv.fsf@bsb.me.uk> <87ilgis3p2.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net uveGqnrMtlyjS9rF7TEb9gQaBOTfP1C1f9LgRlkFRLLBWEg1Qt Cancel-Lock: sha1:dzJinBXXEXsE5vQa+xbzVpR6dc4= Content-Language: de-DE In-Reply-To: <87ilgis3p2.fsf@bsb.me.uk> Xref: csiph.com comp.lang.php:19292 Ben Bacarisse, 2023-02-04 00:56: > Arno Welzel writes: > >> Ben Bacarisse, 2023-02-01 17:09: >> >>> doctor@doctor.nl2k.ab.ca (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