AnsweredAssumed Answered

How to formatting a field value (text) to json object or array

Question asked by alen.cappelletti226776 on Jan 23, 2018
Latest reply on Jan 23, 2018 by leif.jacobsen@dagrofa.dk

Hi,

this below is a document from a API (json format).

The field in red in a result of another action of cleaning.

and

and the result is a valid json format (I try to validate online with success on free service validator).

I try to insert into DB using a map but always have error (json not well format).

It's possible this action? Is there another possible scenario for this action?
I try with a map like object and another like array, but always got error!

----------------------

{
  "data" : [
    {
      "CodArt" : 204285978,
      "Codven" : "XIAONOTE4DEUG",
      "Dispo" : 17,
      "Manufacturer" : "XIAOMI",
      "Promo" : 185.99,
      "SEOurl" : "/smartphone-XIAOMI/d-52263386",
      "costo" : 185.99,
      "LastUpdate_Anagrafica" : 1516197224433,
      "LastUpdate_Inventory" : 1516178062430,
      "last_update" : 1516737829658,
      "shopId" : 0,
      "dispoRiferimento" : 5,
      "IVA" : "22",
      "Weight" : "60",
      "Promo_0" : 185.99,
      "Dispo_0" : 5,
      "infoold" : "[{"sort": "1", "valore": "Redmi Note 4", "id": "208", "nome": "Serie"},{"sort": "2", "valore": "Grigio", "id": "69", "nome": "Colore"},{"sort": "3", "valore": "5.5", "id": "16", "nome": "Dimensione Schermo"},{"sort": "4", "valore": "Full HD", "id": "819", "nome": "Display"},{"sort": "5", "valore": "32 GB", "id": "96", "nome": "Capacit\\u00e0"},{"sort": "6", "valore": "3", "id": "415", "nome": "Ram"},{"sort": "7", "valore": "Octa Core", "id": "99", "nome": "CPU"},{"sort": "8", "valore": "13", "id": "85", "nome": "Fotocamera"},{"sort": "9", "valore": "4G/LTE", "id": "113", "nome": "Connessione"},{"sort": "10", "valore": "Android", "id": "100", "nome": "Sistema Operativo"},{"sort": "11", "valore": "6.0", "id": "983", "nome": "Versione Sistema Operativo"},{"sort": "20", "valore": "Dual Sim", "id": "986", "nome": "Caratteristiche Plus"}]"
    }
  ],
  "size" : 10,
  "cursorMark" : "AoF1sv8q"
}

 

 

Thaks, ALEN

Outcomes