Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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.

0 Likes
1 Solution
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

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().

View solution in original post

2 Replies
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

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().

Anonymous
Not applicable

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!

0 Likes