Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to use the tWriteJSONField component.
It's doing what i want but i don't have the headers in my rows.
The process is pretty simple but i don't understand where i do something wrong
tWriteJSON
And here is the result
{"trucks":["VO","K 360 IB4X2NB",["01483","CARROSSERIE","HIGER",[]],["00448","CONFIGURATION ESSIEUX","4X2",[]],["01503","CARROSSERIE","HIGER",[]],["06526","ORDINATEUR DE BORD","AFFICHAGE KM/H",[]],["02471","NIVEAU EMISSION","EEV",[]],["02301","ORDINATEUR DE BORD","AFFICHAGE KM/H",[]],["00668","PNEUMATIQUES 2E ESSIEU AR","295/80 R22.5",[]],["00666","PNEUMATIQUES ESSIEU AV","295/80 R22.5",[]],["00111","RETARDER","SCANIA",[]],["00020","BLOCAGE DIFFERENTIEL","AVEC",[]]]}
why i don't have my headers in my json?
The problem came from the "array" i read too much solutions and fused them too much
The problem came from the "array" i read too much solutions and fused them too much
Hello,
I resolved your problem, inspire you from my config :
i have seen you have null values wrote with 2 brackets "[]", avoid this by setting a class attribute to object to the fields that might be null, else services who will use your data will struggle
Here is the json result given :
{ "trucks": { "type": "VO", "model": "K 360 IB4X2NB", "caracteristiques": [ { "carac1": "01483", "carac2": "ESSIEUX", "carac3": "BLISFER", "carac4": null }, { "carac1": "01783", "carac2": "ODB", "carac3": "COMPTEUR KMH", "carac4": null }, { "carac1": "01413", "carac2": "CHASSIS", "carac3": "FONTE", "carac4": null } ] } }
Regards,
Pierre