ESP8266 Centre + NB
user_json.h
浏览该文件的文档.
1 /*
2  * ESPRSSIF MIT License
3  *
4  * Copyright (c) 2016 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD>
5  *
6  * Permission is hereby granted for use on ESPRESSIF SYSTEMS ESP8266 only, in which case,
7  * it is free of charge, to any person obtaining a copy of this software and associated
8  * documentation files (the "Software"), to deal in the Software without restriction, including
9  * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  * and/or sell copies of the Software, and to permit persons to whom the Software is furnished
11  * to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all copies or
14  * substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22  *
23  */
24 
25 #ifndef __USER_JSON_H__
26 #define __USER_JSON_H__
27 
28 #include "json/jsonparse.h"
29 #include "json/jsontree.h"
30 
31 #define jsonSize 2*1024
32 
33 void json_parse(struct jsontree_context *json, char *ptrJSONMessage);
34 
35 void json_ws_send(struct jsontree_value *tree, const char *path, char *pbuf);
36 
37 int json_putchar(int c);
38 
39 struct jsontree_value *find_json_path(struct jsontree_context *json, const char *path);
40 //-------------------------------------------
41 int jsonTree_set(struct jsontree_context *js_ctx, struct jsonparse_state *parser);
42 
43 //int jsonObject_set(struct jsonparse_state *parser);
44 
45 int jsonArray_set(struct jsontree_context *js_ctx, struct jsonparse_state *parser);
46 
47 
48 
49 #endif
int json_putchar(int c)
Definition: user_json.c:102
Definition: esp8266_centre_NB/include/include/json/jsonparse.h:44
const char * json
Definition: esp8266_centre_NB/include/include/json/jsonparse.h:45
Definition: esp8266_centre_NB/include/include/json/jsontree.h:61
int jsonArray_set(struct jsontree_context *js_ctx, struct jsonparse_state *parser)
Definition: user_json.c:178
void json_parse(struct jsontree_context *json, char *ptrJSONMessage)
Definition: user_json.c:152
int jsonTree_set(struct jsontree_context *js_ctx, struct jsonparse_state *parser)
struct jsontree_value * find_json_path(struct jsontree_context *json, const char *path)
Definition: user_json.c:44
Definition: esp8266_centre_NB/include/include/json/jsontree.h:52
void json_ws_send(struct jsontree_value *tree, const char *path, char *pbuf)
Definition: user_json.c:120