2 Replies Latest reply on Feb 20, 2017 6:56 AM by lzb_1777891

    how to parse many different json data?

    lzb_1777891

      when we post different msgs to the server, the server will return different json data. I studied the example application ‘httpbin_org',  only one function 'parse_http_response_info()' was registered to parse all json data. I want add another function to parse different json data returned by the server.

      how can I do it? please kindly help, thanks.

        • 1. Re: how to parse many different json data?
          grsr

          You can register another callback function and then call the function wiced_JSON_parser() to parse another parameter within the same JSON object. For instance in the snip httpbin_org, the callback parse_http_response_info() had been registered to parse the "url". You can register another callback parse_http_response_info2() to parse "Host" before calling wiced_JSON_parser().

          2 of 2 people found this helpful
          • 2. Re: how to parse many different json data?
            lzb_1777891

            Dear grsr

                 Thank you so much for your help, it works perfectly according to your reply. By the way, I want to konw how to add another JSON object too, please take a look at this at your convenience.

                  Thank you!