Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert Json string into Object(s) or Cursor(s)
Message
From
14/05/2020 17:12:55
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Web Services
Title:
Convert Json string into Object(s) or Cursor(s)
Miscellaneous
Thread ID:
01674427
Message ID:
01674427
Views:
171
I'm developing a little VFP9 project which consumes a Web Service, this WS has 2 methods, the first method returns a smal Json string which is easily decode into a data record. The second method also returns a Json string. This Json string is much more complex. I tried the vfp_json library and it looks that it doesn't support complex Json strings. I also tried nfJson without success. Does anybody knows about some tools thar can decode the following Json String into VFP cursors or objects that could be used to get the values of each and every record?:

TIA
[
    {
        "sql_error": "1",
        "msg_error": "Ok",
        "guia": "WYB69883941",
        "movimientos": [
            {
                "chk": "CV",
                "fecha": "02/03/2020",
                "hora": "19:28",
                "estado": "VISITADO",
                "sub_estado": "Coordinacion Posterior",
                "apunts": "",
                "agencia": "LIM",
                "gps_px": "0",
                "gps_py": "0",
                "img": []
            },
            {
                "chk": "EB",
                "fecha": "02/03/2020",
                "hora": "19:29",
                "estado": "ENTRO A ALMACEN",
                "sub_estado": "Custodia Temporal En Almac\u00c3\u00a9N",
                "apunts": "",
                "agencia": "LIM",
                "gps_px": "0",
                "gps_py": "0"
            },
            {
                "chk": "SB",
                "fecha": "03/03/2020",
                "hora": "05:23",
                "estado": "SALIO DE ALMACEN",
                "sub_estado": "Salio De Boveda",
                "apunts": "",
                "agencia": "LIM",
                "gps_px": "0",
                "gps_py": "0"
            },
            {
                "chk": "EN",
                "fecha": "03/03/2020",
                "hora": "14:59",
                "estado": "ENTREGADO",
                "sub_estado": "Entrega Con Sello",
                "apunts": "Firma : Sello (DNI:0000)",
                "agencia": "LIM",
                "gps_px": "-12.09139",
                "gps_py": "-77.02647",
                "img": [
                    {
                        "img_path": "6687950_20200303_145359.jpg",
                        "img_px": "-12.09081",
                        "img_py": "-77.02716"
                    },
                    {
                        "img_path": "6687950_20200303_145443.jpg",
                        "img_px": "-12.09081",
                        "img_py": "-77.02716"
                    },
                    {
                        "img_path": "6687950_20200303_145732.jpg",
                        "img_px": "-12.09082",
                        "img_py": "-77.02707"
                    },
                ]
            }
        ],
        "img": [
            {
                "img_path": "6687950_20200303_145359.jpg",
                "img_fecha": "03/03/2020",
                "img_hora": "14:53:59",
                "n_visita": "2"
            },
            {
                "img_path": "6687950_20200303_145443.jpg",
                "img_fecha": "03/03/2020",
                "img_hora": "14:54:43",
                "n_visita": "2"
            },
        ]
    }
]
Next
Reply
Map
View

Click here to load this message in the networking platform