TI Utilities API  1.10.00.09
json_engine.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2018, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
38 #ifndef ti_utils_json_Json_engine__include
39 #define ti_utils_json_Json_engine__include
40 
43 
44 #include <stdint.h>
45 #include <stdbool.h>
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
51 /*****************************************************************************
52 
53  API Prototypes
54 
55 *****************************************************************************/
56 
59 #define __O
60 #define _IO_
61 #define _I_ const
62 
65 typedef enum json_rc_TAG
66 {
69 
77 
80 
93 
94 
99 
103 
105 
106 } json_rc_T;
107 
110 #define JSON_PARSE_FLAGS__ESTIMATE_ONLY 0x80000000u
111 
132 json_rc_T __JSON_Init(__O void * json_internal,
133  _IO_ uint16_t * json_internal_size,
134  _I_ void * json_template,
135  _I_ uint16_t json_template_size);
136 
160 json_rc_T __JSON_Parse(__O void * json_internal,
161  _IO_ uint16_t * json_internal_size,
162  _I_ char * json_text,
163  _I_ uint16_t json_text_size,
164  _I_ void * json_template,
165  _I_ uint16_t json_template_size,
166  _I_ uint32_t flags);
167 
190 json_rc_T __JSON_Build(__O char * json_text,
191  _IO_ uint16_t * json_text_size,
192  _I_ void * json_internal,
193  _I_ void * json_template);
194 
239 json_rc_T __JSON_GetValue(__O void * value_buffer,
240  _IO_ uint16_t * value_buffer_size,
241  _I_ void * json_internal,
242  _I_ char * property_path,
243  _I_ uint16_t property_path_size);
244 
286 json_rc_T __JSON_SetValue(_IO_ void * json_internal,
287  _IO_ uint16_t * json_internal_size,
288  _I_ void * value,
289  _I_ uint16_t value_size,
290  _I_ char * property_path,
291  _I_ uint16_t property_path_size);
292 
320 json_rc_T __JSON_GetArrayMembersCount(__O uint16_t * members_count_var,
321  _I_ void * json_internal,
322  _I_ char * property_path,
323  _I_ uint16_t property_path_size);
346 json_rc_T __JSON_Templetize(__O void * output_template,
347  _IO_ uint16_t * output_template_size,
348  __O uint16_t * minimal_template_size,
349  _I_ char * partly_templetized_json,
350  _I_ uint16_t partly_templetized_json_size);
351 
355 #ifdef __cplusplus
356 }
357 #endif
358 
359 #endif
Definition: json_engine.h:68
Definition: json_engine.h:102
Definition: json_engine.h:100
Definition: json_engine.h:78
Definition: json_engine.h:96
Definition: json_engine.h:81
Definition: json_engine.h:90
enum json_rc_TAG json_rc_T
Definition: json_engine.h:87
Definition: json_engine.h:75
Definition: json_engine.h:88
Definition: json_engine.h:86
Definition: json_engine.h:82
Definition: json_engine.h:67
Definition: json_engine.h:101
Definition: json_engine.h:95
Definition: json_engine.h:104
Definition: json_engine.h:85
Definition: json_engine.h:97
Definition: json_engine.h:72
Definition: json_engine.h:89
Definition: json_engine.h:98
Definition: json_engine.h:79
Definition: json_engine.h:76
Definition: json_engine.h:84
Definition: json_engine.h:71
Definition: json_engine.h:92
Definition: json_engine.h:73
Definition: json_engine.h:74
json_rc_TAG
Definition: json_engine.h:65
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale