1) In user init, start a tcp connection and start receiving.
2) Parse incoming data in web server receive and call json_send.
3) Call json_ws_send, this in turn calls the JSON callback function which has set and get methods as defined below:
LOCAL struct jsontree_callback wifi_connect_ap_callback = JSONTREE_CALLBACK(connect_ap_get, connect_ap_set);
JSONTREE_OBJECT(ap_setting, JSONTREE_PAIR("ssid", &wifi_connect_ap_callback), JSONTREE_PAIR("password", &wifi_connect_ap_callback));
JSONTREE_OBJECT(wifi_tree, JSONTREE_PAIR("ap_details", &ap_setting));
But my problem is that json tree callback never calls the connect_ap_set ( which supposedly extracts the values from json tree to variable which I can then use to print on UART) but calls the connect_ap_get twice.
This is where I have run out of luck and haven't made any further headway.
Any simple solution for using JSON (IoT Demo is too complicated for new users) will be much helpful.Statistics: Posted by paritosharya007 — Sat Jul 11, 2015 6:53 pm
]]>