Re: Stripping a JSON of extra characters in PHP
[email protected] (The Doctor) Fri, 10 Feb 2023 14:39:30 -0000 (UTC)
| Newsgroups | comp.lang.php |
|---|---|
| Organization | NetKnow News |
| Message-ID | <[email protected]> |
In article <[email protected]>, J.O. Aho <[email protected]> wrote: >On 2/9/23 22:01, The Doctor wrote: >> In article <[email protected]>, >> Arno Welzel <[email protected]> wrote: > >>> Sorry - but if you are really not able to understand what I write, you >>> should pay someone to do the job for you. >> >> The problem is the way the supplier wants to oush the information. > >You need to follow the api requierment which says that the json should >have an array of json objects, not an array of arrya with array. > >Your task is to take the posted value convert it to be in the format >that the api requiers. > >Using classes will make the code more readable and you can break things >up into smaller chunks when you are writing your code. I think it's >beter to transform things into a variable and then assing it to the >object's variable to make the assignment clear and simple. Don't forget >that the classes can include arrays, but only use those in the places >where you need it, IMHO it can be sometimes good to iniate the array in >the class constructor (this only can be done as long as the api don't >require the array to be omitted if no values). > >Don't forget that the company providing the API also has a support team >which can help, sure it may come with a cost, depending on the deggree >of help and how much they think is out of topic. For them it's importnat >to earn money and if they think helpiing you will give them enough money >in return, they may help more than they normal support is mandated to do. > There is no support from the providing company. >-- > //Aho > -- Member - Liberal International This is [email protected] Ici [email protected] Yahweh, King & country!Never Satan President Republic!Beware AntiChrist rising! Look at Psalms 14 and 53 on Atheism https://www.empire.kred/ROOTNK?t=94a1f39b We have been misled: there is only one Jesus. -unknown Beware https://mindspring.com