Generated-output differences

quicktype output changed between the PR base and tested PR merge revisions.
← Back to the pull request
5test cases
6files differ
4modified
0new
2deleted
506changed lines
+185 −321insertions / deletions
Base aec5f17b6077b25ded03dfa090a38aa6c28e9852 · PR merge 28354d053a988c6ff4c6fc1e5f019eb6a907c155 · Head f178de7cf09e5abf15679e7a4b9a1040cd221f22 · raw patch
Test case

test/inputs/schema/integer-type.schema

1 generated file · +14 −0
Mschema-cjsondefault / TopLevel.c+14 −0
@@ -25,41 +25,55 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
2525 if (!cJSON_HasObjectItem(j, "above_i32_max")) { cJSON_DeleteTopLevel(x); return NULL; }
2626 if (cJSON_HasObjectItem(j, "above_i32_max")) {
2727 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "above_i32_max"))) { cJSON_DeleteTopLevel(x); return NULL; }
28+ if (cJSON_GetObjectItemCaseSensitive(j, "above_i32_max")->valuedouble < 0) { cJSON_DeleteTopLevel(x); return NULL; }
29+ if (cJSON_GetObjectItemCaseSensitive(j, "above_i32_max")->valuedouble > 2147483648) { cJSON_DeleteTopLevel(x); return NULL; }
2830 x->above_i32_max = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "above_i32_max"));
2931 }
3032 if (!cJSON_HasObjectItem(j, "below_i32_min")) { cJSON_DeleteTopLevel(x); return NULL; }
3133 if (cJSON_HasObjectItem(j, "below_i32_min")) {
3234 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "below_i32_min"))) { cJSON_DeleteTopLevel(x); return NULL; }
35+ if (cJSON_GetObjectItemCaseSensitive(j, "below_i32_min")->valuedouble < -2147483649) { cJSON_DeleteTopLevel(x); return NULL; }
36+ if (cJSON_GetObjectItemCaseSensitive(j, "below_i32_min")->valuedouble > 0) { cJSON_DeleteTopLevel(x); return NULL; }
3337 x->below_i32_min = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "below_i32_min"));
3438 }
3539 if (!cJSON_HasObjectItem(j, "i32_range")) { cJSON_DeleteTopLevel(x); return NULL; }
3640 if (cJSON_HasObjectItem(j, "i32_range")) {
3741 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "i32_range"))) { cJSON_DeleteTopLevel(x); return NULL; }
42+ if (cJSON_GetObjectItemCaseSensitive(j, "i32_range")->valuedouble < -2147483648) { cJSON_DeleteTopLevel(x); return NULL; }
43+ if (cJSON_GetObjectItemCaseSensitive(j, "i32_range")->valuedouble > 2147483647) { cJSON_DeleteTopLevel(x); return NULL; }
3844 x->i32_range = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "i32_range"));
3945 }
4046 if (!cJSON_HasObjectItem(j, "large_bounds")) { cJSON_DeleteTopLevel(x); return NULL; }
4147 if (cJSON_HasObjectItem(j, "large_bounds")) {
4248 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "large_bounds"))) { cJSON_DeleteTopLevel(x); return NULL; }
49+ if (cJSON_GetObjectItemCaseSensitive(j, "large_bounds")->valuedouble < -9007199254740991) { cJSON_DeleteTopLevel(x); return NULL; }
50+ if (cJSON_GetObjectItemCaseSensitive(j, "large_bounds")->valuedouble > 9007199254740991) { cJSON_DeleteTopLevel(x); return NULL; }
4351 x->large_bounds = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "large_bounds"));
4452 }
4553 if (!cJSON_HasObjectItem(j, "only_maximum")) { cJSON_DeleteTopLevel(x); return NULL; }
4654 if (cJSON_HasObjectItem(j, "only_maximum")) {
4755 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "only_maximum"))) { cJSON_DeleteTopLevel(x); return NULL; }
56+ if (cJSON_GetObjectItemCaseSensitive(j, "only_maximum")->valuedouble > 0) { cJSON_DeleteTopLevel(x); return NULL; }
4857 x->only_maximum = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "only_maximum"));
4958 }
5059 if (!cJSON_HasObjectItem(j, "only_minimum")) { cJSON_DeleteTopLevel(x); return NULL; }
5160 if (cJSON_HasObjectItem(j, "only_minimum")) {
5261 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "only_minimum"))) { cJSON_DeleteTopLevel(x); return NULL; }
62+ if (cJSON_GetObjectItemCaseSensitive(j, "only_minimum")->valuedouble < 0) { cJSON_DeleteTopLevel(x); return NULL; }
5363 x->only_minimum = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "only_minimum"));
5464 }
5565 if (!cJSON_HasObjectItem(j, "small_negative")) { cJSON_DeleteTopLevel(x); return NULL; }
5666 if (cJSON_HasObjectItem(j, "small_negative")) {
5767 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "small_negative"))) { cJSON_DeleteTopLevel(x); return NULL; }
68+ if (cJSON_GetObjectItemCaseSensitive(j, "small_negative")->valuedouble < -100) { cJSON_DeleteTopLevel(x); return NULL; }
69+ if (cJSON_GetObjectItemCaseSensitive(j, "small_negative")->valuedouble > 0) { cJSON_DeleteTopLevel(x); return NULL; }
5870 x->small_negative = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "small_negative"));
5971 }
6072 if (!cJSON_HasObjectItem(j, "small_positive")) { cJSON_DeleteTopLevel(x); return NULL; }
6173 if (cJSON_HasObjectItem(j, "small_positive")) {
6274 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "small_positive"))) { cJSON_DeleteTopLevel(x); return NULL; }
75+ if (cJSON_GetObjectItemCaseSensitive(j, "small_positive")->valuedouble < 0) { cJSON_DeleteTopLevel(x); return NULL; }
76+ if (cJSON_GetObjectItemCaseSensitive(j, "small_positive")->valuedouble > 100) { cJSON_DeleteTopLevel(x); return NULL; }
6377 x->small_positive = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "small_positive"));
6478 }
6579 if (!cJSON_HasObjectItem(j, "unbounded")) { cJSON_DeleteTopLevel(x); return NULL; }
Test case

test/inputs/schema/minmax-integer.schema

1 generated file · +10 −0
Mschema-cjsondefault / TopLevel.c+10 −0
@@ -30,26 +30,34 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
3030 if (!cJSON_HasObjectItem(j, "intersection")) { cJSON_DeleteTopLevel(x); return NULL; }
3131 if (cJSON_HasObjectItem(j, "intersection")) {
3232 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "intersection"))) { cJSON_DeleteTopLevel(x); return NULL; }
33+ if (cJSON_GetObjectItemCaseSensitive(j, "intersection")->valuedouble < 4) { cJSON_DeleteTopLevel(x); return NULL; }
34+ if (cJSON_GetObjectItemCaseSensitive(j, "intersection")->valuedouble > 5) { cJSON_DeleteTopLevel(x); return NULL; }
3335 x->intersection = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "intersection"));
3436 }
3537 if (!cJSON_HasObjectItem(j, "max")) { cJSON_DeleteTopLevel(x); return NULL; }
3638 if (cJSON_HasObjectItem(j, "max")) {
3739 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "max"))) { cJSON_DeleteTopLevel(x); return NULL; }
40+ if (cJSON_GetObjectItemCaseSensitive(j, "max")->valuedouble > 5) { cJSON_DeleteTopLevel(x); return NULL; }
3841 x->max = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "max"));
3942 }
4043 if (!cJSON_HasObjectItem(j, "min")) { cJSON_DeleteTopLevel(x); return NULL; }
4144 if (cJSON_HasObjectItem(j, "min")) {
4245 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "min"))) { cJSON_DeleteTopLevel(x); return NULL; }
46+ if (cJSON_GetObjectItemCaseSensitive(j, "min")->valuedouble < 3) { cJSON_DeleteTopLevel(x); return NULL; }
4347 x->min = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "min"));
4448 }
4549 if (!cJSON_HasObjectItem(j, "minmax")) { cJSON_DeleteTopLevel(x); return NULL; }
4650 if (cJSON_HasObjectItem(j, "minmax")) {
4751 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "minmax"))) { cJSON_DeleteTopLevel(x); return NULL; }
52+ if (cJSON_GetObjectItemCaseSensitive(j, "minmax")->valuedouble < 3) { cJSON_DeleteTopLevel(x); return NULL; }
53+ if (cJSON_GetObjectItemCaseSensitive(j, "minmax")->valuedouble > 5) { cJSON_DeleteTopLevel(x); return NULL; }
4854 x->minmax = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "minmax"));
4955 }
5056 if (!cJSON_HasObjectItem(j, "minMaxIntersection")) { cJSON_DeleteTopLevel(x); return NULL; }
5157 if (cJSON_HasObjectItem(j, "minMaxIntersection")) {
5258 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "minMaxIntersection"))) { cJSON_DeleteTopLevel(x); return NULL; }
59+ if (cJSON_GetObjectItemCaseSensitive(j, "minMaxIntersection")->valuedouble < 3) { cJSON_DeleteTopLevel(x); return NULL; }
60+ if (cJSON_GetObjectItemCaseSensitive(j, "minMaxIntersection")->valuedouble > 5) { cJSON_DeleteTopLevel(x); return NULL; }
5361 x->min_max_intersection = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "minMaxIntersection"));
5462 }
5563 if (!cJSON_HasObjectItem(j, "minMaxUnion")) { cJSON_DeleteTopLevel(x); return NULL; }
@@ -60,6 +68,8 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
6068 if (!cJSON_HasObjectItem(j, "union")) { cJSON_DeleteTopLevel(x); return NULL; }
6169 if (cJSON_HasObjectItem(j, "union")) {
6270 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "union"))) { cJSON_DeleteTopLevel(x); return NULL; }
71+ if (cJSON_GetObjectItemCaseSensitive(j, "union")->valuedouble < 3) { cJSON_DeleteTopLevel(x); return NULL; }
72+ if (cJSON_GetObjectItemCaseSensitive(j, "union")->valuedouble > 6) { cJSON_DeleteTopLevel(x); return NULL; }
6373 x->top_level_union = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "union"));
6474 }
6575 }
Test case

test/inputs/schema/minmaxlength.schema

2 generated files · +0 −319
Dschema-cjsondefault / TopLevel.c+0 −248
@@ -1,248 +0,0 @@
1-/**
2- * TopLevel.c
3- * This file has been autogenerated using quicktype https://github.com/quicktype/quicktype - DO NOT EDIT
4- */
5-
6-#include "TopLevel.h"
7-
8-struct InUnion * cJSON_GetInUnionValue(const cJSON * j) {
9- struct InUnion * x = cJSON_malloc(sizeof(struct InUnion));
10- if (NULL != x) {
11- memset(x, 0, sizeof(struct InUnion));
12- if (cJSON_IsNumber(j)) {
13- x->type = cJSON_Number;
14- x->value.number = cJSON_GetNumberValue(j);
15- }
16- else if (cJSON_IsString(j)) {
17- x->type = cJSON_String;
18- x->value.string = strdup(cJSON_GetStringValue(j));
19- }
20- }
21- return x;
22-}
23-
24-cJSON * cJSON_CreateInUnion(const struct InUnion * x) {
25- cJSON * j = NULL;
26- if (NULL != x) {
27- if (cJSON_Number == x->type) {
28- j = cJSON_CreateNumber(x->value.number);
29- }
30- else if (cJSON_String == x->type) {
31- j = cJSON_CreateString(x->value.string);
32- }
33- }
34- return j;
35-}
36-
37-void cJSON_DeleteInUnion(struct InUnion * x) {
38- if (NULL != x) {
39- if (cJSON_Number == x->type) {
40- }
41- else if (cJSON_String == x->type) {
42- cJSON_free(x->value.string);
43- }
44- cJSON_free(x);
45- }
46-}
47-
48-struct TopLevel * cJSON_ParseTopLevel(const char * s) {
49- struct TopLevel * x = NULL;
50- if (NULL != s) {
51- cJSON * j = cJSON_Parse(s);
52- if (NULL != j) {
53- x = cJSON_GetTopLevelValue(j);
54- cJSON_Delete(j);
55- }
56- }
57- return x;
58-}
59-
60-struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
61- struct TopLevel * x = NULL;
62- if (NULL != j) {
63- if (NULL != (x = cJSON_malloc(sizeof(struct TopLevel)))) {
64- memset(x, 0, sizeof(struct TopLevel));
65- if (!cJSON_HasObjectItem(j, "intersection")) { cJSON_DeleteTopLevel(x); return NULL; }
66- if (cJSON_HasObjectItem(j, "intersection")) {
67- if (!cJSON_IsString(cJSON_GetObjectItemCaseSensitive(j, "intersection"))) { cJSON_DeleteTopLevel(x); return NULL; }
68- if (strlen(cJSON_GetObjectItemCaseSensitive(j, "intersection")->valuestring) < 4) { cJSON_DeleteTopLevel(x); return NULL; }
69- if (strlen(cJSON_GetObjectItemCaseSensitive(j, "intersection")->valuestring) > 5) { cJSON_DeleteTopLevel(x); return NULL; }
70- x->intersection = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "intersection")));
71- }
72- else {
73- if (NULL != (x->intersection = cJSON_malloc(sizeof(char)))) {
74- x->intersection[0] = '\0';
75- }
76- }
77- if (!cJSON_HasObjectItem(j, "inUnion")) { cJSON_DeleteTopLevel(x); return NULL; }
78- if (cJSON_HasObjectItem(j, "inUnion")) {
79- if (!cJSON_IsInUnion(cJSON_GetObjectItemCaseSensitive(j, "inUnion"))) { cJSON_DeleteTopLevel(x); return NULL; }
80- x->in_union = cJSON_GetInUnionValue(cJSON_GetObjectItemCaseSensitive(j, "inUnion"));
81- if (NULL == x->in_union) { cJSON_DeleteTopLevel(x); return NULL; }
82- }
83- if (!cJSON_HasObjectItem(j, "maxlength")) { cJSON_DeleteTopLevel(x); return NULL; }
84- if (cJSON_HasObjectItem(j, "maxlength")) {
85- if (!cJSON_IsString(cJSON_GetObjectItemCaseSensitive(j, "maxlength"))) { cJSON_DeleteTopLevel(x); return NULL; }
86- if (strlen(cJSON_GetObjectItemCaseSensitive(j, "maxlength")->valuestring) > 5) { cJSON_DeleteTopLevel(x); return NULL; }
87- x->maxlength = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "maxlength")));
88- }
89- else {
90- if (NULL != (x->maxlength = cJSON_malloc(sizeof(char)))) {
91- x->maxlength[0] = '\0';
92- }
93- }
94- if (!cJSON_HasObjectItem(j, "minlength")) { cJSON_DeleteTopLevel(x); return NULL; }
95- if (cJSON_HasObjectItem(j, "minlength")) {
96- if (!cJSON_IsString(cJSON_GetObjectItemCaseSensitive(j, "minlength"))) { cJSON_DeleteTopLevel(x); return NULL; }
97- if (strlen(cJSON_GetObjectItemCaseSensitive(j, "minlength")->valuestring) < 3) { cJSON_DeleteTopLevel(x); return NULL; }
98- x->minlength = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "minlength")));
99- }
100- else {
101- if (NULL != (x->minlength = cJSON_malloc(sizeof(char)))) {
102- x->minlength[0] = '\0';
103- }
104- }
105- if (!cJSON_HasObjectItem(j, "minMaxIntersection")) { cJSON_DeleteTopLevel(x); return NULL; }
106- if (cJSON_HasObjectItem(j, "minMaxIntersection")) {
107- if (!cJSON_IsString(cJSON_GetObjectItemCaseSensitive(j, "minMaxIntersection"))) { cJSON_DeleteTopLevel(x); return NULL; }
108- if (strlen(cJSON_GetObjectItemCaseSensitive(j, "minMaxIntersection")->valuestring) < 3) { cJSON_DeleteTopLevel(x); return NULL; }
109- if (strlen(cJSON_GetObjectItemCaseSensitive(j, "minMaxIntersection")->valuestring) > 5) { cJSON_DeleteTopLevel(x); return NULL; }
110- x->min_max_intersection = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "minMaxIntersection")));
111- }
112- else {
113- if (NULL != (x->min_max_intersection = cJSON_malloc(sizeof(char)))) {
114- x->min_max_intersection[0] = '\0';
115- }
116- }
117- if (!cJSON_HasObjectItem(j, "minmaxlength")) { cJSON_DeleteTopLevel(x); return NULL; }
118- if (cJSON_HasObjectItem(j, "minmaxlength")) {
119- if (!cJSON_IsString(cJSON_GetObjectItemCaseSensitive(j, "minmaxlength"))) { cJSON_DeleteTopLevel(x); return NULL; }
120- if (strlen(cJSON_GetObjectItemCaseSensitive(j, "minmaxlength")->valuestring) < 3) { cJSON_DeleteTopLevel(x); return NULL; }
121- if (strlen(cJSON_GetObjectItemCaseSensitive(j, "minmaxlength")->valuestring) > 5) { cJSON_DeleteTopLevel(x); return NULL; }
122- x->minmaxlength = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "minmaxlength")));
123- }
124- else {
125- if (NULL != (x->minmaxlength = cJSON_malloc(sizeof(char)))) {
126- x->minmaxlength[0] = '\0';
127- }
128- }
129- if (!cJSON_HasObjectItem(j, "minMaxUnion")) { cJSON_DeleteTopLevel(x); return NULL; }
130- if (cJSON_HasObjectItem(j, "minMaxUnion")) {
131- if (!cJSON_IsString(cJSON_GetObjectItemCaseSensitive(j, "minMaxUnion"))) { cJSON_DeleteTopLevel(x); return NULL; }
132- x->min_max_union = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "minMaxUnion")));
133- }
134- else {
135- if (NULL != (x->min_max_union = cJSON_malloc(sizeof(char)))) {
136- x->min_max_union[0] = '\0';
137- }
138- }
139- if (!cJSON_HasObjectItem(j, "union")) { cJSON_DeleteTopLevel(x); return NULL; }
140- if (cJSON_HasObjectItem(j, "union")) {
141- if (!cJSON_IsString(cJSON_GetObjectItemCaseSensitive(j, "union"))) { cJSON_DeleteTopLevel(x); return NULL; }
142- if (strlen(cJSON_GetObjectItemCaseSensitive(j, "union")->valuestring) < 3) { cJSON_DeleteTopLevel(x); return NULL; }
143- if (strlen(cJSON_GetObjectItemCaseSensitive(j, "union")->valuestring) > 6) { cJSON_DeleteTopLevel(x); return NULL; }
144- x->top_level_union = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "union")));
145- }
146- else {
147- if (NULL != (x->top_level_union = cJSON_malloc(sizeof(char)))) {
148- x->top_level_union[0] = '\0';
149- }
150- }
151- }
152- }
153- return x;
154-}
155-
156-cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
157- cJSON * j = NULL;
158- if (NULL != x) {
159- if (NULL != (j = cJSON_CreateObject())) {
160- if (NULL != x->intersection) {
161- cJSON_AddStringToObject(j, "intersection", x->intersection);
162- }
163- else {
164- cJSON_AddStringToObject(j, "intersection", "");
165- }
166- cJSON_AddItemToObject(j, "inUnion", cJSON_CreateInUnion(x->in_union));
167- if (NULL != x->maxlength) {
168- cJSON_AddStringToObject(j, "maxlength", x->maxlength);
169- }
170- else {
171- cJSON_AddStringToObject(j, "maxlength", "");
172- }
173- if (NULL != x->minlength) {
174- cJSON_AddStringToObject(j, "minlength", x->minlength);
175- }
176- else {
177- cJSON_AddStringToObject(j, "minlength", "");
178- }
179- if (NULL != x->min_max_intersection) {
180- cJSON_AddStringToObject(j, "minMaxIntersection", x->min_max_intersection);
181- }
182- else {
183- cJSON_AddStringToObject(j, "minMaxIntersection", "");
184- }
185- if (NULL != x->minmaxlength) {
186- cJSON_AddStringToObject(j, "minmaxlength", x->minmaxlength);
187- }
188- else {
189- cJSON_AddStringToObject(j, "minmaxlength", "");
190- }
191- if (NULL != x->min_max_union) {
192- cJSON_AddStringToObject(j, "minMaxUnion", x->min_max_union);
193- }
194- else {
195- cJSON_AddStringToObject(j, "minMaxUnion", "");
196- }
197- if (NULL != x->top_level_union) {
198- cJSON_AddStringToObject(j, "union", x->top_level_union);
199- }
200- else {
201- cJSON_AddStringToObject(j, "union", "");
202- }
203- }
204- }
205- return j;
206-}
207-
208-char * cJSON_PrintTopLevel(const struct TopLevel * x) {
209- char * s = NULL;
210- if (NULL != x) {
211- cJSON * j = cJSON_CreateTopLevel(x);
212- if (NULL != j) {
213- s = cJSON_Print(j);
214- cJSON_Delete(j);
215- }
216- }
217- return s;
218-}
219-
220-void cJSON_DeleteTopLevel(struct TopLevel * x) {
221- if (NULL != x) {
222- if (NULL != x->intersection) {
223- cJSON_free(x->intersection);
224- }
225- if (NULL != x->in_union) {
226- cJSON_DeleteInUnion(x->in_union);
227- }
228- if (NULL != x->maxlength) {
229- cJSON_free(x->maxlength);
230- }
231- if (NULL != x->minlength) {
232- cJSON_free(x->minlength);
233- }
234- if (NULL != x->min_max_intersection) {
235- cJSON_free(x->min_max_intersection);
236- }
237- if (NULL != x->minmaxlength) {
238- cJSON_free(x->minmaxlength);
239- }
240- if (NULL != x->min_max_union) {
241- cJSON_free(x->min_max_union);
242- }
243- if (NULL != x->top_level_union) {
244- cJSON_free(x->top_level_union);
245- }
246- cJSON_free(x);
247- }
248-}
Dschema-cjsondefault / TopLevel.h+0 −71
@@ -1,71 +0,0 @@
1-/**
2- * TopLevel.h
3- * This file has been autogenerated using quicktype https://github.com/quicktype/quicktype - DO NOT EDIT
4- * This file depends of https://github.com/DaveGamble/cJSON, https://github.com/joelguittet/c-list and https://github.com/joelguittet/c-hashtable
5- * To parse json data from json string use the following: struct <type> * data = cJSON_Parse<type>(<string>);
6- * To get json data from cJSON object use the following: struct <type> * data = cJSON_Get<type>Value(<cjson>);
7- * To get cJSON object from json data use the following: cJSON * cjson = cJSON_Create<type>(<data>);
8- * To print json string from json data use the following: char * string = cJSON_Print<type>(<data>);
9- * To delete json data use the following: cJSON_Delete<type>(<data>);
10- */
11-
12-#ifndef __TOPLEVEL_H__
13-#define __TOPLEVEL_H__
14-
15-#ifdef __cplusplus
16-extern "C" {
17-#endif
18-
19-#include <stdint.h>
20-#include <stdbool.h>
21-#include <stdlib.h>
22-#include <string.h>
23-#include <cJSON.h>
24-#include <hashtable.h>
25-#include <list.h>
26-
27-#ifndef cJSON_Bool
28-#define cJSON_Bool (cJSON_True | cJSON_False)
29-#endif
30-#ifndef cJSON_Map
31-#define cJSON_Map (1 << 16)
32-#endif
33-#ifndef cJSON_Enum
34-#define cJSON_Enum (1 << 17)
35-#endif
36-
37-struct InUnion {
38- int type;
39- union {
40- double number;
41- char * string;
42- } value;
43-};
44-
45-struct TopLevel {
46- char * intersection;
47- struct InUnion * in_union;
48- char * maxlength;
49- char * minlength;
50- char * min_max_intersection;
51- char * minmaxlength;
52- char * min_max_union;
53- char * top_level_union;
54-};
55-
56-#define cJSON_IsInUnion(j) (cJSON_IsNumber(j) || cJSON_IsString(j))
57-struct InUnion * cJSON_GetInUnionValue(const cJSON * j);
58-cJSON * cJSON_CreateInUnion(const struct InUnion * x);
59-void cJSON_DeleteInUnion(struct InUnion * x);
60-
61-struct TopLevel * cJSON_ParseTopLevel(const char * s);
62-struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j);
63-cJSON * cJSON_CreateTopLevel(const struct TopLevel * x);
64-char * cJSON_PrintTopLevel(const struct TopLevel * x);
65-void cJSON_DeleteTopLevel(struct TopLevel * x);
66-
67-#ifdef __cplusplus
68-}
69-#endif
70-
71-#endif /* __TOPLEVEL_H__ */
Test case

test/inputs/schema/renaming-bug.schema

1 generated file · +0 −2
Mschema-cjsondefault / TopLevel.c+0 −2
@@ -591,7 +591,6 @@ struct Berry * cJSON_GetBerryValue(const cJSON * j) {
591591 }
592592 if (cJSON_HasObjectItem(j, "name")) {
593593 if (!cJSON_IsString(cJSON_GetObjectItemCaseSensitive(j, "name"))) { cJSON_DeleteBerry(x); return NULL; }
594- if (strlen(cJSON_GetObjectItemCaseSensitive(j, "name")->valuestring) < 1) { cJSON_DeleteBerry(x); return NULL; }
595594 x->name = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "name")));
596595 }
597596 if (cJSON_HasObjectItem(j, "shapes")) {
@@ -1021,7 +1020,6 @@ struct Vehicle * cJSON_GetVehicleValue(const cJSON * j) {
10211020 }
10221021 if (cJSON_HasObjectItem(j, "id")) {
10231022 if (!cJSON_IsString(cJSON_GetObjectItemCaseSensitive(j, "id"))) { cJSON_DeleteVehicle(x); return NULL; }
1024- if (strlen(cJSON_GetObjectItemCaseSensitive(j, "id")->valuestring) < 1) { cJSON_DeleteVehicle(x); return NULL; }
10251023 x->id = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "id")));
10261024 }
10271025 if (cJSON_HasObjectItem(j, "speed")) {
Test case

test/inputs/schema/vega-lite.schema

1 generated file · +161 −0
Mschema-cjsondefault / TopLevel.c+161 −0
@@ -3048,6 +3048,8 @@ struct MarkConfig * cJSON_GetMarkConfigValue(const cJSON * j) {
30483048 }
30493049 if (cJSON_HasObjectItem(j, "angle")) {
30503050 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "angle"))) { cJSON_DeleteMarkConfig(x); return NULL; }
3051+ if (cJSON_GetObjectItemCaseSensitive(j, "angle")->valuedouble < 0) { cJSON_DeleteMarkConfig(x); return NULL; }
3052+ if (cJSON_GetObjectItemCaseSensitive(j, "angle")->valuedouble > 360) { cJSON_DeleteMarkConfig(x); return NULL; }
30513053 if (NULL != (x->angle = cJSON_malloc(sizeof(double)))) {
30523054 *x->angle = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "angle"));
30533055 }
@@ -3094,6 +3096,8 @@ struct MarkConfig * cJSON_GetMarkConfigValue(const cJSON * j) {
30943096 }
30953097 if (cJSON_HasObjectItem(j, "fillOpacity")) {
30963098 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "fillOpacity"))) { cJSON_DeleteMarkConfig(x); return NULL; }
3099+ if (cJSON_GetObjectItemCaseSensitive(j, "fillOpacity")->valuedouble < 0) { cJSON_DeleteMarkConfig(x); return NULL; }
3100+ if (cJSON_GetObjectItemCaseSensitive(j, "fillOpacity")->valuedouble > 1) { cJSON_DeleteMarkConfig(x); return NULL; }
30973101 if (NULL != (x->fill_opacity = cJSON_malloc(sizeof(double)))) {
30983102 *x->fill_opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "fillOpacity"));
30993103 }
@@ -3104,6 +3108,7 @@ struct MarkConfig * cJSON_GetMarkConfigValue(const cJSON * j) {
31043108 }
31053109 if (cJSON_HasObjectItem(j, "fontSize")) {
31063110 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "fontSize"))) { cJSON_DeleteMarkConfig(x); return NULL; }
3111+ if (cJSON_GetObjectItemCaseSensitive(j, "fontSize")->valuedouble < 0) { cJSON_DeleteMarkConfig(x); return NULL; }
31073112 if (NULL != (x->font_size = cJSON_malloc(sizeof(double)))) {
31083113 *x->font_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "fontSize"));
31093114 }
@@ -3139,6 +3144,8 @@ struct MarkConfig * cJSON_GetMarkConfigValue(const cJSON * j) {
31393144 }
31403145 if (cJSON_HasObjectItem(j, "opacity")) {
31413146 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "opacity"))) { cJSON_DeleteMarkConfig(x); return NULL; }
3147+ if (cJSON_GetObjectItemCaseSensitive(j, "opacity")->valuedouble < 0) { cJSON_DeleteMarkConfig(x); return NULL; }
3148+ if (cJSON_GetObjectItemCaseSensitive(j, "opacity")->valuedouble > 1) { cJSON_DeleteMarkConfig(x); return NULL; }
31423149 if (NULL != (x->opacity = cJSON_malloc(sizeof(double)))) {
31433150 *x->opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "opacity"));
31443151 }
@@ -3152,6 +3159,7 @@ struct MarkConfig * cJSON_GetMarkConfigValue(const cJSON * j) {
31523159 }
31533160 if (cJSON_HasObjectItem(j, "radius")) {
31543161 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "radius"))) { cJSON_DeleteMarkConfig(x); return NULL; }
3162+ if (cJSON_GetObjectItemCaseSensitive(j, "radius")->valuedouble < 0) { cJSON_DeleteMarkConfig(x); return NULL; }
31553163 if (NULL != (x->radius = cJSON_malloc(sizeof(double)))) {
31563164 *x->radius = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "radius"));
31573165 }
@@ -3162,6 +3170,7 @@ struct MarkConfig * cJSON_GetMarkConfigValue(const cJSON * j) {
31623170 }
31633171 if (cJSON_HasObjectItem(j, "size")) {
31643172 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "size"))) { cJSON_DeleteMarkConfig(x); return NULL; }
3173+ if (cJSON_GetObjectItemCaseSensitive(j, "size")->valuedouble < 0) { cJSON_DeleteMarkConfig(x); return NULL; }
31653174 if (NULL != (x->size = cJSON_malloc(sizeof(double)))) {
31663175 *x->size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "size"));
31673176 }
@@ -3194,18 +3203,23 @@ struct MarkConfig * cJSON_GetMarkConfigValue(const cJSON * j) {
31943203 }
31953204 if (cJSON_HasObjectItem(j, "strokeOpacity")) {
31963205 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity"))) { cJSON_DeleteMarkConfig(x); return NULL; }
3206+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity")->valuedouble < 0) { cJSON_DeleteMarkConfig(x); return NULL; }
3207+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity")->valuedouble > 1) { cJSON_DeleteMarkConfig(x); return NULL; }
31973208 if (NULL != (x->stroke_opacity = cJSON_malloc(sizeof(double)))) {
31983209 *x->stroke_opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity"));
31993210 }
32003211 }
32013212 if (cJSON_HasObjectItem(j, "strokeWidth")) {
32023213 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "strokeWidth"))) { cJSON_DeleteMarkConfig(x); return NULL; }
3214+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeWidth")->valuedouble < 0) { cJSON_DeleteMarkConfig(x); return NULL; }
32033215 if (NULL != (x->stroke_width = cJSON_malloc(sizeof(double)))) {
32043216 *x->stroke_width = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "strokeWidth"));
32053217 }
32063218 }
32073219 if (cJSON_HasObjectItem(j, "tension")) {
32083220 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "tension"))) { cJSON_DeleteMarkConfig(x); return NULL; }
3221+ if (cJSON_GetObjectItemCaseSensitive(j, "tension")->valuedouble < 0) { cJSON_DeleteMarkConfig(x); return NULL; }
3222+ if (cJSON_GetObjectItemCaseSensitive(j, "tension")->valuedouble > 1) { cJSON_DeleteMarkConfig(x); return NULL; }
32093223 if (NULL != (x->tension = cJSON_malloc(sizeof(double)))) {
32103224 *x->tension = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "tension"));
32113225 }
@@ -3511,18 +3525,23 @@ struct AxisConfig * cJSON_GetAxisConfigValue(const cJSON * j) {
35113525 }
35123526 if (cJSON_HasObjectItem(j, "gridOpacity")) {
35133527 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "gridOpacity"))) { cJSON_DeleteAxisConfig(x); return NULL; }
3528+ if (cJSON_GetObjectItemCaseSensitive(j, "gridOpacity")->valuedouble < 0) { cJSON_DeleteAxisConfig(x); return NULL; }
3529+ if (cJSON_GetObjectItemCaseSensitive(j, "gridOpacity")->valuedouble > 1) { cJSON_DeleteAxisConfig(x); return NULL; }
35143530 if (NULL != (x->grid_opacity = cJSON_malloc(sizeof(double)))) {
35153531 *x->grid_opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "gridOpacity"));
35163532 }
35173533 }
35183534 if (cJSON_HasObjectItem(j, "gridWidth")) {
35193535 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "gridWidth"))) { cJSON_DeleteAxisConfig(x); return NULL; }
3536+ if (cJSON_GetObjectItemCaseSensitive(j, "gridWidth")->valuedouble < 0) { cJSON_DeleteAxisConfig(x); return NULL; }
35203537 if (NULL != (x->grid_width = cJSON_malloc(sizeof(double)))) {
35213538 *x->grid_width = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "gridWidth"));
35223539 }
35233540 }
35243541 if (cJSON_HasObjectItem(j, "labelAngle")) {
35253542 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "labelAngle"))) { cJSON_DeleteAxisConfig(x); return NULL; }
3543+ if (cJSON_GetObjectItemCaseSensitive(j, "labelAngle")->valuedouble < -360) { cJSON_DeleteAxisConfig(x); return NULL; }
3544+ if (cJSON_GetObjectItemCaseSensitive(j, "labelAngle")->valuedouble > 360) { cJSON_DeleteAxisConfig(x); return NULL; }
35263545 if (NULL != (x->label_angle = cJSON_malloc(sizeof(double)))) {
35273546 *x->label_angle = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "labelAngle"));
35283547 }
@@ -3547,6 +3566,7 @@ struct AxisConfig * cJSON_GetAxisConfigValue(const cJSON * j) {
35473566 }
35483567 if (cJSON_HasObjectItem(j, "labelFontSize")) {
35493568 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "labelFontSize"))) { cJSON_DeleteAxisConfig(x); return NULL; }
3569+ if (cJSON_GetObjectItemCaseSensitive(j, "labelFontSize")->valuedouble < 0) { cJSON_DeleteAxisConfig(x); return NULL; }
35503570 if (NULL != (x->label_font_size = cJSON_malloc(sizeof(double)))) {
35513571 *x->label_font_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "labelFontSize"));
35523572 }
@@ -3610,12 +3630,14 @@ struct AxisConfig * cJSON_GetAxisConfigValue(const cJSON * j) {
36103630 }
36113631 if (cJSON_HasObjectItem(j, "tickSize")) {
36123632 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "tickSize"))) { cJSON_DeleteAxisConfig(x); return NULL; }
3633+ if (cJSON_GetObjectItemCaseSensitive(j, "tickSize")->valuedouble < 0) { cJSON_DeleteAxisConfig(x); return NULL; }
36133634 if (NULL != (x->tick_size = cJSON_malloc(sizeof(double)))) {
36143635 *x->tick_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "tickSize"));
36153636 }
36163637 }
36173638 if (cJSON_HasObjectItem(j, "tickWidth")) {
36183639 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "tickWidth"))) { cJSON_DeleteAxisConfig(x); return NULL; }
3640+ if (cJSON_GetObjectItemCaseSensitive(j, "tickWidth")->valuedouble < 0) { cJSON_DeleteAxisConfig(x); return NULL; }
36193641 if (NULL != (x->tick_width = cJSON_malloc(sizeof(double)))) {
36203642 *x->tick_width = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "tickWidth"));
36213643 }
@@ -3644,6 +3666,7 @@ struct AxisConfig * cJSON_GetAxisConfigValue(const cJSON * j) {
36443666 }
36453667 if (cJSON_HasObjectItem(j, "titleFontSize")) {
36463668 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "titleFontSize"))) { cJSON_DeleteAxisConfig(x); return NULL; }
3669+ if (cJSON_GetObjectItemCaseSensitive(j, "titleFontSize")->valuedouble < 0) { cJSON_DeleteAxisConfig(x); return NULL; }
36473670 if (NULL != (x->title_font_size = cJSON_malloc(sizeof(double)))) {
36483671 *x->title_font_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "titleFontSize"));
36493672 }
@@ -4028,18 +4051,23 @@ struct VgAxisConfig * cJSON_GetVgAxisConfigValue(const cJSON * j) {
40284051 }
40294052 if (cJSON_HasObjectItem(j, "gridOpacity")) {
40304053 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "gridOpacity"))) { cJSON_DeleteVgAxisConfig(x); return NULL; }
4054+ if (cJSON_GetObjectItemCaseSensitive(j, "gridOpacity")->valuedouble < 0) { cJSON_DeleteVgAxisConfig(x); return NULL; }
4055+ if (cJSON_GetObjectItemCaseSensitive(j, "gridOpacity")->valuedouble > 1) { cJSON_DeleteVgAxisConfig(x); return NULL; }
40314056 if (NULL != (x->grid_opacity = cJSON_malloc(sizeof(double)))) {
40324057 *x->grid_opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "gridOpacity"));
40334058 }
40344059 }
40354060 if (cJSON_HasObjectItem(j, "gridWidth")) {
40364061 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "gridWidth"))) { cJSON_DeleteVgAxisConfig(x); return NULL; }
4062+ if (cJSON_GetObjectItemCaseSensitive(j, "gridWidth")->valuedouble < 0) { cJSON_DeleteVgAxisConfig(x); return NULL; }
40374063 if (NULL != (x->grid_width = cJSON_malloc(sizeof(double)))) {
40384064 *x->grid_width = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "gridWidth"));
40394065 }
40404066 }
40414067 if (cJSON_HasObjectItem(j, "labelAngle")) {
40424068 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "labelAngle"))) { cJSON_DeleteVgAxisConfig(x); return NULL; }
4069+ if (cJSON_GetObjectItemCaseSensitive(j, "labelAngle")->valuedouble < -360) { cJSON_DeleteVgAxisConfig(x); return NULL; }
4070+ if (cJSON_GetObjectItemCaseSensitive(j, "labelAngle")->valuedouble > 360) { cJSON_DeleteVgAxisConfig(x); return NULL; }
40434071 if (NULL != (x->label_angle = cJSON_malloc(sizeof(double)))) {
40444072 *x->label_angle = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "labelAngle"));
40454073 }
@@ -4064,6 +4092,7 @@ struct VgAxisConfig * cJSON_GetVgAxisConfigValue(const cJSON * j) {
40644092 }
40654093 if (cJSON_HasObjectItem(j, "labelFontSize")) {
40664094 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "labelFontSize"))) { cJSON_DeleteVgAxisConfig(x); return NULL; }
4095+ if (cJSON_GetObjectItemCaseSensitive(j, "labelFontSize")->valuedouble < 0) { cJSON_DeleteVgAxisConfig(x); return NULL; }
40674096 if (NULL != (x->label_font_size = cJSON_malloc(sizeof(double)))) {
40684097 *x->label_font_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "labelFontSize"));
40694098 }
@@ -4121,12 +4150,14 @@ struct VgAxisConfig * cJSON_GetVgAxisConfigValue(const cJSON * j) {
41214150 }
41224151 if (cJSON_HasObjectItem(j, "tickSize")) {
41234152 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "tickSize"))) { cJSON_DeleteVgAxisConfig(x); return NULL; }
4153+ if (cJSON_GetObjectItemCaseSensitive(j, "tickSize")->valuedouble < 0) { cJSON_DeleteVgAxisConfig(x); return NULL; }
41244154 if (NULL != (x->tick_size = cJSON_malloc(sizeof(double)))) {
41254155 *x->tick_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "tickSize"));
41264156 }
41274157 }
41284158 if (cJSON_HasObjectItem(j, "tickWidth")) {
41294159 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "tickWidth"))) { cJSON_DeleteVgAxisConfig(x); return NULL; }
4160+ if (cJSON_GetObjectItemCaseSensitive(j, "tickWidth")->valuedouble < 0) { cJSON_DeleteVgAxisConfig(x); return NULL; }
41304161 if (NULL != (x->tick_width = cJSON_malloc(sizeof(double)))) {
41314162 *x->tick_width = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "tickWidth"));
41324163 }
@@ -4155,6 +4186,7 @@ struct VgAxisConfig * cJSON_GetVgAxisConfigValue(const cJSON * j) {
41554186 }
41564187 if (cJSON_HasObjectItem(j, "titleFontSize")) {
41574188 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "titleFontSize"))) { cJSON_DeleteVgAxisConfig(x); return NULL; }
4189+ if (cJSON_GetObjectItemCaseSensitive(j, "titleFontSize")->valuedouble < 0) { cJSON_DeleteVgAxisConfig(x); return NULL; }
41584190 if (NULL != (x->title_font_size = cJSON_malloc(sizeof(double)))) {
41594191 *x->title_font_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "titleFontSize"));
41604192 }
@@ -4492,6 +4524,8 @@ struct BarConfig * cJSON_GetBarConfigValue(const cJSON * j) {
44924524 }
44934525 if (cJSON_HasObjectItem(j, "angle")) {
44944526 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "angle"))) { cJSON_DeleteBarConfig(x); return NULL; }
4527+ if (cJSON_GetObjectItemCaseSensitive(j, "angle")->valuedouble < 0) { cJSON_DeleteBarConfig(x); return NULL; }
4528+ if (cJSON_GetObjectItemCaseSensitive(j, "angle")->valuedouble > 360) { cJSON_DeleteBarConfig(x); return NULL; }
44954529 if (NULL != (x->angle = cJSON_malloc(sizeof(double)))) {
44964530 *x->angle = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "angle"));
44974531 }
@@ -4505,6 +4539,7 @@ struct BarConfig * cJSON_GetBarConfigValue(const cJSON * j) {
45054539 }
45064540 if (cJSON_HasObjectItem(j, "binSpacing")) {
45074541 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "binSpacing"))) { cJSON_DeleteBarConfig(x); return NULL; }
4542+ if (cJSON_GetObjectItemCaseSensitive(j, "binSpacing")->valuedouble < 0) { cJSON_DeleteBarConfig(x); return NULL; }
45084543 if (NULL != (x->bin_spacing = cJSON_malloc(sizeof(double)))) {
45094544 *x->bin_spacing = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "binSpacing"));
45104545 }
@@ -4515,6 +4550,7 @@ struct BarConfig * cJSON_GetBarConfigValue(const cJSON * j) {
45154550 }
45164551 if (cJSON_HasObjectItem(j, "continuousBandSize")) {
45174552 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "continuousBandSize"))) { cJSON_DeleteBarConfig(x); return NULL; }
4553+ if (cJSON_GetObjectItemCaseSensitive(j, "continuousBandSize")->valuedouble < 0) { cJSON_DeleteBarConfig(x); return NULL; }
45184554 if (NULL != (x->continuous_band_size = cJSON_malloc(sizeof(double)))) {
45194555 *x->continuous_band_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "continuousBandSize"));
45204556 }
@@ -4528,6 +4564,7 @@ struct BarConfig * cJSON_GetBarConfigValue(const cJSON * j) {
45284564 }
45294565 if (cJSON_HasObjectItem(j, "discreteBandSize")) {
45304566 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "discreteBandSize"))) { cJSON_DeleteBarConfig(x); return NULL; }
4567+ if (cJSON_GetObjectItemCaseSensitive(j, "discreteBandSize")->valuedouble < 0) { cJSON_DeleteBarConfig(x); return NULL; }
45314568 if (NULL != (x->discrete_band_size = cJSON_malloc(sizeof(double)))) {
45324569 *x->discrete_band_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "discreteBandSize"));
45334570 }
@@ -4556,6 +4593,8 @@ struct BarConfig * cJSON_GetBarConfigValue(const cJSON * j) {
45564593 }
45574594 if (cJSON_HasObjectItem(j, "fillOpacity")) {
45584595 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "fillOpacity"))) { cJSON_DeleteBarConfig(x); return NULL; }
4596+ if (cJSON_GetObjectItemCaseSensitive(j, "fillOpacity")->valuedouble < 0) { cJSON_DeleteBarConfig(x); return NULL; }
4597+ if (cJSON_GetObjectItemCaseSensitive(j, "fillOpacity")->valuedouble > 1) { cJSON_DeleteBarConfig(x); return NULL; }
45594598 if (NULL != (x->fill_opacity = cJSON_malloc(sizeof(double)))) {
45604599 *x->fill_opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "fillOpacity"));
45614600 }
@@ -4566,6 +4605,7 @@ struct BarConfig * cJSON_GetBarConfigValue(const cJSON * j) {
45664605 }
45674606 if (cJSON_HasObjectItem(j, "fontSize")) {
45684607 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "fontSize"))) { cJSON_DeleteBarConfig(x); return NULL; }
4608+ if (cJSON_GetObjectItemCaseSensitive(j, "fontSize")->valuedouble < 0) { cJSON_DeleteBarConfig(x); return NULL; }
45694609 if (NULL != (x->font_size = cJSON_malloc(sizeof(double)))) {
45704610 *x->font_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "fontSize"));
45714611 }
@@ -4601,6 +4641,8 @@ struct BarConfig * cJSON_GetBarConfigValue(const cJSON * j) {
46014641 }
46024642 if (cJSON_HasObjectItem(j, "opacity")) {
46034643 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "opacity"))) { cJSON_DeleteBarConfig(x); return NULL; }
4644+ if (cJSON_GetObjectItemCaseSensitive(j, "opacity")->valuedouble < 0) { cJSON_DeleteBarConfig(x); return NULL; }
4645+ if (cJSON_GetObjectItemCaseSensitive(j, "opacity")->valuedouble > 1) { cJSON_DeleteBarConfig(x); return NULL; }
46044646 if (NULL != (x->opacity = cJSON_malloc(sizeof(double)))) {
46054647 *x->opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "opacity"));
46064648 }
@@ -4614,6 +4656,7 @@ struct BarConfig * cJSON_GetBarConfigValue(const cJSON * j) {
46144656 }
46154657 if (cJSON_HasObjectItem(j, "radius")) {
46164658 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "radius"))) { cJSON_DeleteBarConfig(x); return NULL; }
4659+ if (cJSON_GetObjectItemCaseSensitive(j, "radius")->valuedouble < 0) { cJSON_DeleteBarConfig(x); return NULL; }
46174660 if (NULL != (x->radius = cJSON_malloc(sizeof(double)))) {
46184661 *x->radius = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "radius"));
46194662 }
@@ -4624,6 +4667,7 @@ struct BarConfig * cJSON_GetBarConfigValue(const cJSON * j) {
46244667 }
46254668 if (cJSON_HasObjectItem(j, "size")) {
46264669 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "size"))) { cJSON_DeleteBarConfig(x); return NULL; }
4670+ if (cJSON_GetObjectItemCaseSensitive(j, "size")->valuedouble < 0) { cJSON_DeleteBarConfig(x); return NULL; }
46274671 if (NULL != (x->size = cJSON_malloc(sizeof(double)))) {
46284672 *x->size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "size"));
46294673 }
@@ -4656,18 +4700,23 @@ struct BarConfig * cJSON_GetBarConfigValue(const cJSON * j) {
46564700 }
46574701 if (cJSON_HasObjectItem(j, "strokeOpacity")) {
46584702 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity"))) { cJSON_DeleteBarConfig(x); return NULL; }
4703+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity")->valuedouble < 0) { cJSON_DeleteBarConfig(x); return NULL; }
4704+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity")->valuedouble > 1) { cJSON_DeleteBarConfig(x); return NULL; }
46594705 if (NULL != (x->stroke_opacity = cJSON_malloc(sizeof(double)))) {
46604706 *x->stroke_opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity"));
46614707 }
46624708 }
46634709 if (cJSON_HasObjectItem(j, "strokeWidth")) {
46644710 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "strokeWidth"))) { cJSON_DeleteBarConfig(x); return NULL; }
4711+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeWidth")->valuedouble < 0) { cJSON_DeleteBarConfig(x); return NULL; }
46654712 if (NULL != (x->stroke_width = cJSON_malloc(sizeof(double)))) {
46664713 *x->stroke_width = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "strokeWidth"));
46674714 }
46684715 }
46694716 if (cJSON_HasObjectItem(j, "tension")) {
46704717 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "tension"))) { cJSON_DeleteBarConfig(x); return NULL; }
4718+ if (cJSON_GetObjectItemCaseSensitive(j, "tension")->valuedouble < 0) { cJSON_DeleteBarConfig(x); return NULL; }
4719+ if (cJSON_GetObjectItemCaseSensitive(j, "tension")->valuedouble > 1) { cJSON_DeleteBarConfig(x); return NULL; }
46714720 if (NULL != (x->tension = cJSON_malloc(sizeof(double)))) {
46724721 *x->tension = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "tension"));
46734722 }
@@ -4959,6 +5008,7 @@ struct LegendConfig * cJSON_GetLegendConfigValue(const cJSON * j) {
49595008 }
49605009 if (cJSON_HasObjectItem(j, "gradientHeight")) {
49615010 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "gradientHeight"))) { cJSON_DeleteLegendConfig(x); return NULL; }
5011+ if (cJSON_GetObjectItemCaseSensitive(j, "gradientHeight")->valuedouble < 0) { cJSON_DeleteLegendConfig(x); return NULL; }
49625012 if (NULL != (x->gradient_height = cJSON_malloc(sizeof(double)))) {
49635013 *x->gradient_height = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "gradientHeight"));
49645014 }
@@ -4985,12 +5035,14 @@ struct LegendConfig * cJSON_GetLegendConfigValue(const cJSON * j) {
49855035 }
49865036 if (cJSON_HasObjectItem(j, "gradientStrokeWidth")) {
49875037 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "gradientStrokeWidth"))) { cJSON_DeleteLegendConfig(x); return NULL; }
5038+ if (cJSON_GetObjectItemCaseSensitive(j, "gradientStrokeWidth")->valuedouble < 0) { cJSON_DeleteLegendConfig(x); return NULL; }
49885039 if (NULL != (x->gradient_stroke_width = cJSON_malloc(sizeof(double)))) {
49895040 *x->gradient_stroke_width = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "gradientStrokeWidth"));
49905041 }
49915042 }
49925043 if (cJSON_HasObjectItem(j, "gradientWidth")) {
49935044 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "gradientWidth"))) { cJSON_DeleteLegendConfig(x); return NULL; }
5045+ if (cJSON_GetObjectItemCaseSensitive(j, "gradientWidth")->valuedouble < 0) { cJSON_DeleteLegendConfig(x); return NULL; }
49945046 if (NULL != (x->gradient_width = cJSON_malloc(sizeof(double)))) {
49955047 *x->gradient_width = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "gradientWidth"));
49965048 }
@@ -5013,6 +5065,7 @@ struct LegendConfig * cJSON_GetLegendConfigValue(const cJSON * j) {
50135065 }
50145066 if (cJSON_HasObjectItem(j, "labelFontSize")) {
50155067 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "labelFontSize"))) { cJSON_DeleteLegendConfig(x); return NULL; }
5068+ if (cJSON_GetObjectItemCaseSensitive(j, "labelFontSize")->valuedouble < 0) { cJSON_DeleteLegendConfig(x); return NULL; }
50165069 if (NULL != (x->label_font_size = cJSON_malloc(sizeof(double)))) {
50175070 *x->label_font_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "labelFontSize"));
50185071 }
@@ -5025,6 +5078,7 @@ struct LegendConfig * cJSON_GetLegendConfigValue(const cJSON * j) {
50255078 }
50265079 if (cJSON_HasObjectItem(j, "labelOffset")) {
50275080 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "labelOffset"))) { cJSON_DeleteLegendConfig(x); return NULL; }
5081+ if (cJSON_GetObjectItemCaseSensitive(j, "labelOffset")->valuedouble < 0) { cJSON_DeleteLegendConfig(x); return NULL; }
50285082 if (NULL != (x->label_offset = cJSON_malloc(sizeof(double)))) {
50295083 *x->label_offset = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "labelOffset"));
50305084 }
@@ -5086,12 +5140,14 @@ struct LegendConfig * cJSON_GetLegendConfigValue(const cJSON * j) {
50865140 }
50875141 if (cJSON_HasObjectItem(j, "symbolSize")) {
50885142 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "symbolSize"))) { cJSON_DeleteLegendConfig(x); return NULL; }
5143+ if (cJSON_GetObjectItemCaseSensitive(j, "symbolSize")->valuedouble < 0) { cJSON_DeleteLegendConfig(x); return NULL; }
50895144 if (NULL != (x->symbol_size = cJSON_malloc(sizeof(double)))) {
50905145 *x->symbol_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "symbolSize"));
50915146 }
50925147 }
50935148 if (cJSON_HasObjectItem(j, "symbolStrokeWidth")) {
50945149 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "symbolStrokeWidth"))) { cJSON_DeleteLegendConfig(x); return NULL; }
5150+ if (cJSON_GetObjectItemCaseSensitive(j, "symbolStrokeWidth")->valuedouble < 0) { cJSON_DeleteLegendConfig(x); return NULL; }
50955151 if (NULL != (x->symbol_stroke_width = cJSON_malloc(sizeof(double)))) {
50965152 *x->symbol_stroke_width = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "symbolStrokeWidth"));
50975153 }
@@ -5978,12 +6034,16 @@ struct ScaleConfig * cJSON_GetScaleConfigValue(const cJSON * j) {
59786034 memset(x, 0, sizeof(struct ScaleConfig));
59796035 if (cJSON_HasObjectItem(j, "bandPaddingInner")) {
59806036 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "bandPaddingInner"))) { cJSON_DeleteScaleConfig(x); return NULL; }
6037+ if (cJSON_GetObjectItemCaseSensitive(j, "bandPaddingInner")->valuedouble < 0) { cJSON_DeleteScaleConfig(x); return NULL; }
6038+ if (cJSON_GetObjectItemCaseSensitive(j, "bandPaddingInner")->valuedouble > 1) { cJSON_DeleteScaleConfig(x); return NULL; }
59816039 if (NULL != (x->band_padding_inner = cJSON_malloc(sizeof(double)))) {
59826040 *x->band_padding_inner = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "bandPaddingInner"));
59836041 }
59846042 }
59856043 if (cJSON_HasObjectItem(j, "bandPaddingOuter")) {
59866044 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "bandPaddingOuter"))) { cJSON_DeleteScaleConfig(x); return NULL; }
6045+ if (cJSON_GetObjectItemCaseSensitive(j, "bandPaddingOuter")->valuedouble < 0) { cJSON_DeleteScaleConfig(x); return NULL; }
6046+ if (cJSON_GetObjectItemCaseSensitive(j, "bandPaddingOuter")->valuedouble > 1) { cJSON_DeleteScaleConfig(x); return NULL; }
59876047 if (NULL != (x->band_padding_outer = cJSON_malloc(sizeof(double)))) {
59886048 *x->band_padding_outer = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "bandPaddingOuter"));
59896049 }
@@ -5996,72 +6056,87 @@ struct ScaleConfig * cJSON_GetScaleConfigValue(const cJSON * j) {
59966056 }
59976057 if (cJSON_HasObjectItem(j, "continuousPadding")) {
59986058 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "continuousPadding"))) { cJSON_DeleteScaleConfig(x); return NULL; }
6059+ if (cJSON_GetObjectItemCaseSensitive(j, "continuousPadding")->valuedouble < 0) { cJSON_DeleteScaleConfig(x); return NULL; }
59996060 if (NULL != (x->continuous_padding = cJSON_malloc(sizeof(double)))) {
60006061 *x->continuous_padding = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "continuousPadding"));
60016062 }
60026063 }
60036064 if (cJSON_HasObjectItem(j, "maxBandSize")) {
60046065 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "maxBandSize"))) { cJSON_DeleteScaleConfig(x); return NULL; }
6066+ if (cJSON_GetObjectItemCaseSensitive(j, "maxBandSize")->valuedouble < 0) { cJSON_DeleteScaleConfig(x); return NULL; }
60056067 if (NULL != (x->max_band_size = cJSON_malloc(sizeof(double)))) {
60066068 *x->max_band_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "maxBandSize"));
60076069 }
60086070 }
60096071 if (cJSON_HasObjectItem(j, "maxFontSize")) {
60106072 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "maxFontSize"))) { cJSON_DeleteScaleConfig(x); return NULL; }
6073+ if (cJSON_GetObjectItemCaseSensitive(j, "maxFontSize")->valuedouble < 0) { cJSON_DeleteScaleConfig(x); return NULL; }
60116074 if (NULL != (x->max_font_size = cJSON_malloc(sizeof(double)))) {
60126075 *x->max_font_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "maxFontSize"));
60136076 }
60146077 }
60156078 if (cJSON_HasObjectItem(j, "maxOpacity")) {
60166079 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "maxOpacity"))) { cJSON_DeleteScaleConfig(x); return NULL; }
6080+ if (cJSON_GetObjectItemCaseSensitive(j, "maxOpacity")->valuedouble < 0) { cJSON_DeleteScaleConfig(x); return NULL; }
6081+ if (cJSON_GetObjectItemCaseSensitive(j, "maxOpacity")->valuedouble > 1) { cJSON_DeleteScaleConfig(x); return NULL; }
60176082 if (NULL != (x->max_opacity = cJSON_malloc(sizeof(double)))) {
60186083 *x->max_opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "maxOpacity"));
60196084 }
60206085 }
60216086 if (cJSON_HasObjectItem(j, "maxSize")) {
60226087 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "maxSize"))) { cJSON_DeleteScaleConfig(x); return NULL; }
6088+ if (cJSON_GetObjectItemCaseSensitive(j, "maxSize")->valuedouble < 0) { cJSON_DeleteScaleConfig(x); return NULL; }
60236089 if (NULL != (x->max_size = cJSON_malloc(sizeof(double)))) {
60246090 *x->max_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "maxSize"));
60256091 }
60266092 }
60276093 if (cJSON_HasObjectItem(j, "maxStrokeWidth")) {
60286094 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "maxStrokeWidth"))) { cJSON_DeleteScaleConfig(x); return NULL; }
6095+ if (cJSON_GetObjectItemCaseSensitive(j, "maxStrokeWidth")->valuedouble < 0) { cJSON_DeleteScaleConfig(x); return NULL; }
60296096 if (NULL != (x->max_stroke_width = cJSON_malloc(sizeof(double)))) {
60306097 *x->max_stroke_width = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "maxStrokeWidth"));
60316098 }
60326099 }
60336100 if (cJSON_HasObjectItem(j, "minBandSize")) {
60346101 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "minBandSize"))) { cJSON_DeleteScaleConfig(x); return NULL; }
6102+ if (cJSON_GetObjectItemCaseSensitive(j, "minBandSize")->valuedouble < 0) { cJSON_DeleteScaleConfig(x); return NULL; }
60356103 if (NULL != (x->min_band_size = cJSON_malloc(sizeof(double)))) {
60366104 *x->min_band_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "minBandSize"));
60376105 }
60386106 }
60396107 if (cJSON_HasObjectItem(j, "minFontSize")) {
60406108 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "minFontSize"))) { cJSON_DeleteScaleConfig(x); return NULL; }
6109+ if (cJSON_GetObjectItemCaseSensitive(j, "minFontSize")->valuedouble < 0) { cJSON_DeleteScaleConfig(x); return NULL; }
60416110 if (NULL != (x->min_font_size = cJSON_malloc(sizeof(double)))) {
60426111 *x->min_font_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "minFontSize"));
60436112 }
60446113 }
60456114 if (cJSON_HasObjectItem(j, "minOpacity")) {
60466115 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "minOpacity"))) { cJSON_DeleteScaleConfig(x); return NULL; }
6116+ if (cJSON_GetObjectItemCaseSensitive(j, "minOpacity")->valuedouble < 0) { cJSON_DeleteScaleConfig(x); return NULL; }
6117+ if (cJSON_GetObjectItemCaseSensitive(j, "minOpacity")->valuedouble > 1) { cJSON_DeleteScaleConfig(x); return NULL; }
60476118 if (NULL != (x->min_opacity = cJSON_malloc(sizeof(double)))) {
60486119 *x->min_opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "minOpacity"));
60496120 }
60506121 }
60516122 if (cJSON_HasObjectItem(j, "minSize")) {
60526123 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "minSize"))) { cJSON_DeleteScaleConfig(x); return NULL; }
6124+ if (cJSON_GetObjectItemCaseSensitive(j, "minSize")->valuedouble < 0) { cJSON_DeleteScaleConfig(x); return NULL; }
60536125 if (NULL != (x->min_size = cJSON_malloc(sizeof(double)))) {
60546126 *x->min_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "minSize"));
60556127 }
60566128 }
60576129 if (cJSON_HasObjectItem(j, "minStrokeWidth")) {
60586130 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "minStrokeWidth"))) { cJSON_DeleteScaleConfig(x); return NULL; }
6131+ if (cJSON_GetObjectItemCaseSensitive(j, "minStrokeWidth")->valuedouble < 0) { cJSON_DeleteScaleConfig(x); return NULL; }
60596132 if (NULL != (x->min_stroke_width = cJSON_malloc(sizeof(double)))) {
60606133 *x->min_stroke_width = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "minStrokeWidth"));
60616134 }
60626135 }
60636136 if (cJSON_HasObjectItem(j, "pointPadding")) {
60646137 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "pointPadding"))) { cJSON_DeleteScaleConfig(x); return NULL; }
6138+ if (cJSON_GetObjectItemCaseSensitive(j, "pointPadding")->valuedouble < 0) { cJSON_DeleteScaleConfig(x); return NULL; }
6139+ if (cJSON_GetObjectItemCaseSensitive(j, "pointPadding")->valuedouble > 1) { cJSON_DeleteScaleConfig(x); return NULL; }
60656140 if (NULL != (x->point_padding = cJSON_malloc(sizeof(double)))) {
60666141 *x->point_padding = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "pointPadding"));
60676142 }
@@ -6080,6 +6155,7 @@ struct ScaleConfig * cJSON_GetScaleConfigValue(const cJSON * j) {
60806155 }
60816156 if (cJSON_HasObjectItem(j, "textXRangeStep")) {
60826157 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "textXRangeStep"))) { cJSON_DeleteScaleConfig(x); return NULL; }
6158+ if (cJSON_GetObjectItemCaseSensitive(j, "textXRangeStep")->valuedouble < 0) { cJSON_DeleteScaleConfig(x); return NULL; }
60836159 if (NULL != (x->text_x_range_step = cJSON_malloc(sizeof(double)))) {
60846160 *x->text_x_range_step = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "textXRangeStep"));
60856161 }
@@ -7194,6 +7270,8 @@ struct VgMarkConfig * cJSON_GetVgMarkConfigValue(const cJSON * j) {
71947270 }
71957271 if (cJSON_HasObjectItem(j, "angle")) {
71967272 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "angle"))) { cJSON_DeleteVgMarkConfig(x); return NULL; }
7273+ if (cJSON_GetObjectItemCaseSensitive(j, "angle")->valuedouble < 0) { cJSON_DeleteVgMarkConfig(x); return NULL; }
7274+ if (cJSON_GetObjectItemCaseSensitive(j, "angle")->valuedouble > 360) { cJSON_DeleteVgMarkConfig(x); return NULL; }
71977275 if (NULL != (x->angle = cJSON_malloc(sizeof(double)))) {
71987276 *x->angle = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "angle"));
71997277 }
@@ -7230,6 +7308,8 @@ struct VgMarkConfig * cJSON_GetVgMarkConfigValue(const cJSON * j) {
72307308 }
72317309 if (cJSON_HasObjectItem(j, "fillOpacity")) {
72327310 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "fillOpacity"))) { cJSON_DeleteVgMarkConfig(x); return NULL; }
7311+ if (cJSON_GetObjectItemCaseSensitive(j, "fillOpacity")->valuedouble < 0) { cJSON_DeleteVgMarkConfig(x); return NULL; }
7312+ if (cJSON_GetObjectItemCaseSensitive(j, "fillOpacity")->valuedouble > 1) { cJSON_DeleteVgMarkConfig(x); return NULL; }
72337313 if (NULL != (x->fill_opacity = cJSON_malloc(sizeof(double)))) {
72347314 *x->fill_opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "fillOpacity"));
72357315 }
@@ -7240,6 +7320,7 @@ struct VgMarkConfig * cJSON_GetVgMarkConfigValue(const cJSON * j) {
72407320 }
72417321 if (cJSON_HasObjectItem(j, "fontSize")) {
72427322 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "fontSize"))) { cJSON_DeleteVgMarkConfig(x); return NULL; }
7323+ if (cJSON_GetObjectItemCaseSensitive(j, "fontSize")->valuedouble < 0) { cJSON_DeleteVgMarkConfig(x); return NULL; }
72437324 if (NULL != (x->font_size = cJSON_malloc(sizeof(double)))) {
72447325 *x->font_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "fontSize"));
72457326 }
@@ -7275,6 +7356,8 @@ struct VgMarkConfig * cJSON_GetVgMarkConfigValue(const cJSON * j) {
72757356 }
72767357 if (cJSON_HasObjectItem(j, "opacity")) {
72777358 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "opacity"))) { cJSON_DeleteVgMarkConfig(x); return NULL; }
7359+ if (cJSON_GetObjectItemCaseSensitive(j, "opacity")->valuedouble < 0) { cJSON_DeleteVgMarkConfig(x); return NULL; }
7360+ if (cJSON_GetObjectItemCaseSensitive(j, "opacity")->valuedouble > 1) { cJSON_DeleteVgMarkConfig(x); return NULL; }
72787361 if (NULL != (x->opacity = cJSON_malloc(sizeof(double)))) {
72797362 *x->opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "opacity"));
72807363 }
@@ -7288,6 +7371,7 @@ struct VgMarkConfig * cJSON_GetVgMarkConfigValue(const cJSON * j) {
72887371 }
72897372 if (cJSON_HasObjectItem(j, "radius")) {
72907373 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "radius"))) { cJSON_DeleteVgMarkConfig(x); return NULL; }
7374+ if (cJSON_GetObjectItemCaseSensitive(j, "radius")->valuedouble < 0) { cJSON_DeleteVgMarkConfig(x); return NULL; }
72917375 if (NULL != (x->radius = cJSON_malloc(sizeof(double)))) {
72927376 *x->radius = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "radius"));
72937377 }
@@ -7298,6 +7382,7 @@ struct VgMarkConfig * cJSON_GetVgMarkConfigValue(const cJSON * j) {
72987382 }
72997383 if (cJSON_HasObjectItem(j, "size")) {
73007384 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "size"))) { cJSON_DeleteVgMarkConfig(x); return NULL; }
7385+ if (cJSON_GetObjectItemCaseSensitive(j, "size")->valuedouble < 0) { cJSON_DeleteVgMarkConfig(x); return NULL; }
73017386 if (NULL != (x->size = cJSON_malloc(sizeof(double)))) {
73027387 *x->size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "size"));
73037388 }
@@ -7330,18 +7415,23 @@ struct VgMarkConfig * cJSON_GetVgMarkConfigValue(const cJSON * j) {
73307415 }
73317416 if (cJSON_HasObjectItem(j, "strokeOpacity")) {
73327417 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity"))) { cJSON_DeleteVgMarkConfig(x); return NULL; }
7418+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity")->valuedouble < 0) { cJSON_DeleteVgMarkConfig(x); return NULL; }
7419+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity")->valuedouble > 1) { cJSON_DeleteVgMarkConfig(x); return NULL; }
73337420 if (NULL != (x->stroke_opacity = cJSON_malloc(sizeof(double)))) {
73347421 *x->stroke_opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity"));
73357422 }
73367423 }
73377424 if (cJSON_HasObjectItem(j, "strokeWidth")) {
73387425 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "strokeWidth"))) { cJSON_DeleteVgMarkConfig(x); return NULL; }
7426+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeWidth")->valuedouble < 0) { cJSON_DeleteVgMarkConfig(x); return NULL; }
73397427 if (NULL != (x->stroke_width = cJSON_malloc(sizeof(double)))) {
73407428 *x->stroke_width = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "strokeWidth"));
73417429 }
73427430 }
73437431 if (cJSON_HasObjectItem(j, "tension")) {
73447432 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "tension"))) { cJSON_DeleteVgMarkConfig(x); return NULL; }
7433+ if (cJSON_GetObjectItemCaseSensitive(j, "tension")->valuedouble < 0) { cJSON_DeleteVgMarkConfig(x); return NULL; }
7434+ if (cJSON_GetObjectItemCaseSensitive(j, "tension")->valuedouble > 1) { cJSON_DeleteVgMarkConfig(x); return NULL; }
73457435 if (NULL != (x->tension = cJSON_malloc(sizeof(double)))) {
73467436 *x->tension = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "tension"));
73477437 }
@@ -7594,6 +7684,8 @@ struct TextConfig * cJSON_GetTextConfigValue(const cJSON * j) {
75947684 }
75957685 if (cJSON_HasObjectItem(j, "angle")) {
75967686 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "angle"))) { cJSON_DeleteTextConfig(x); return NULL; }
7687+ if (cJSON_GetObjectItemCaseSensitive(j, "angle")->valuedouble < 0) { cJSON_DeleteTextConfig(x); return NULL; }
7688+ if (cJSON_GetObjectItemCaseSensitive(j, "angle")->valuedouble > 360) { cJSON_DeleteTextConfig(x); return NULL; }
75977689 if (NULL != (x->angle = cJSON_malloc(sizeof(double)))) {
75987690 *x->angle = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "angle"));
75997691 }
@@ -7640,6 +7732,8 @@ struct TextConfig * cJSON_GetTextConfigValue(const cJSON * j) {
76407732 }
76417733 if (cJSON_HasObjectItem(j, "fillOpacity")) {
76427734 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "fillOpacity"))) { cJSON_DeleteTextConfig(x); return NULL; }
7735+ if (cJSON_GetObjectItemCaseSensitive(j, "fillOpacity")->valuedouble < 0) { cJSON_DeleteTextConfig(x); return NULL; }
7736+ if (cJSON_GetObjectItemCaseSensitive(j, "fillOpacity")->valuedouble > 1) { cJSON_DeleteTextConfig(x); return NULL; }
76437737 if (NULL != (x->fill_opacity = cJSON_malloc(sizeof(double)))) {
76447738 *x->fill_opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "fillOpacity"));
76457739 }
@@ -7650,6 +7744,7 @@ struct TextConfig * cJSON_GetTextConfigValue(const cJSON * j) {
76507744 }
76517745 if (cJSON_HasObjectItem(j, "fontSize")) {
76527746 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "fontSize"))) { cJSON_DeleteTextConfig(x); return NULL; }
7747+ if (cJSON_GetObjectItemCaseSensitive(j, "fontSize")->valuedouble < 0) { cJSON_DeleteTextConfig(x); return NULL; }
76537748 if (NULL != (x->font_size = cJSON_malloc(sizeof(double)))) {
76547749 *x->font_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "fontSize"));
76557750 }
@@ -7685,6 +7780,8 @@ struct TextConfig * cJSON_GetTextConfigValue(const cJSON * j) {
76857780 }
76867781 if (cJSON_HasObjectItem(j, "opacity")) {
76877782 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "opacity"))) { cJSON_DeleteTextConfig(x); return NULL; }
7783+ if (cJSON_GetObjectItemCaseSensitive(j, "opacity")->valuedouble < 0) { cJSON_DeleteTextConfig(x); return NULL; }
7784+ if (cJSON_GetObjectItemCaseSensitive(j, "opacity")->valuedouble > 1) { cJSON_DeleteTextConfig(x); return NULL; }
76887785 if (NULL != (x->opacity = cJSON_malloc(sizeof(double)))) {
76897786 *x->opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "opacity"));
76907787 }
@@ -7698,6 +7795,7 @@ struct TextConfig * cJSON_GetTextConfigValue(const cJSON * j) {
76987795 }
76997796 if (cJSON_HasObjectItem(j, "radius")) {
77007797 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "radius"))) { cJSON_DeleteTextConfig(x); return NULL; }
7798+ if (cJSON_GetObjectItemCaseSensitive(j, "radius")->valuedouble < 0) { cJSON_DeleteTextConfig(x); return NULL; }
77017799 if (NULL != (x->radius = cJSON_malloc(sizeof(double)))) {
77027800 *x->radius = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "radius"));
77037801 }
@@ -7714,6 +7812,7 @@ struct TextConfig * cJSON_GetTextConfigValue(const cJSON * j) {
77147812 }
77157813 if (cJSON_HasObjectItem(j, "size")) {
77167814 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "size"))) { cJSON_DeleteTextConfig(x); return NULL; }
7815+ if (cJSON_GetObjectItemCaseSensitive(j, "size")->valuedouble < 0) { cJSON_DeleteTextConfig(x); return NULL; }
77177816 if (NULL != (x->size = cJSON_malloc(sizeof(double)))) {
77187817 *x->size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "size"));
77197818 }
@@ -7746,18 +7845,23 @@ struct TextConfig * cJSON_GetTextConfigValue(const cJSON * j) {
77467845 }
77477846 if (cJSON_HasObjectItem(j, "strokeOpacity")) {
77487847 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity"))) { cJSON_DeleteTextConfig(x); return NULL; }
7848+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity")->valuedouble < 0) { cJSON_DeleteTextConfig(x); return NULL; }
7849+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity")->valuedouble > 1) { cJSON_DeleteTextConfig(x); return NULL; }
77497850 if (NULL != (x->stroke_opacity = cJSON_malloc(sizeof(double)))) {
77507851 *x->stroke_opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity"));
77517852 }
77527853 }
77537854 if (cJSON_HasObjectItem(j, "strokeWidth")) {
77547855 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "strokeWidth"))) { cJSON_DeleteTextConfig(x); return NULL; }
7856+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeWidth")->valuedouble < 0) { cJSON_DeleteTextConfig(x); return NULL; }
77557857 if (NULL != (x->stroke_width = cJSON_malloc(sizeof(double)))) {
77567858 *x->stroke_width = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "strokeWidth"));
77577859 }
77587860 }
77597861 if (cJSON_HasObjectItem(j, "tension")) {
77607862 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "tension"))) { cJSON_DeleteTextConfig(x); return NULL; }
7863+ if (cJSON_GetObjectItemCaseSensitive(j, "tension")->valuedouble < 0) { cJSON_DeleteTextConfig(x); return NULL; }
7864+ if (cJSON_GetObjectItemCaseSensitive(j, "tension")->valuedouble > 1) { cJSON_DeleteTextConfig(x); return NULL; }
77617865 if (NULL != (x->tension = cJSON_malloc(sizeof(double)))) {
77627866 *x->tension = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "tension"));
77637867 }
@@ -8028,12 +8132,15 @@ struct TickConfig * cJSON_GetTickConfigValue(const cJSON * j) {
80288132 }
80298133 if (cJSON_HasObjectItem(j, "angle")) {
80308134 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "angle"))) { cJSON_DeleteTickConfig(x); return NULL; }
8135+ if (cJSON_GetObjectItemCaseSensitive(j, "angle")->valuedouble < 0) { cJSON_DeleteTickConfig(x); return NULL; }
8136+ if (cJSON_GetObjectItemCaseSensitive(j, "angle")->valuedouble > 360) { cJSON_DeleteTickConfig(x); return NULL; }
80318137 if (NULL != (x->angle = cJSON_malloc(sizeof(double)))) {
80328138 *x->angle = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "angle"));
80338139 }
80348140 }
80358141 if (cJSON_HasObjectItem(j, "bandSize")) {
80368142 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "bandSize"))) { cJSON_DeleteTickConfig(x); return NULL; }
8143+ if (cJSON_GetObjectItemCaseSensitive(j, "bandSize")->valuedouble < 0) { cJSON_DeleteTickConfig(x); return NULL; }
80378144 if (NULL != (x->band_size = cJSON_malloc(sizeof(double)))) {
80388145 *x->band_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "bandSize"));
80398146 }
@@ -8080,6 +8187,8 @@ struct TickConfig * cJSON_GetTickConfigValue(const cJSON * j) {
80808187 }
80818188 if (cJSON_HasObjectItem(j, "fillOpacity")) {
80828189 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "fillOpacity"))) { cJSON_DeleteTickConfig(x); return NULL; }
8190+ if (cJSON_GetObjectItemCaseSensitive(j, "fillOpacity")->valuedouble < 0) { cJSON_DeleteTickConfig(x); return NULL; }
8191+ if (cJSON_GetObjectItemCaseSensitive(j, "fillOpacity")->valuedouble > 1) { cJSON_DeleteTickConfig(x); return NULL; }
80838192 if (NULL != (x->fill_opacity = cJSON_malloc(sizeof(double)))) {
80848193 *x->fill_opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "fillOpacity"));
80858194 }
@@ -8090,6 +8199,7 @@ struct TickConfig * cJSON_GetTickConfigValue(const cJSON * j) {
80908199 }
80918200 if (cJSON_HasObjectItem(j, "fontSize")) {
80928201 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "fontSize"))) { cJSON_DeleteTickConfig(x); return NULL; }
8202+ if (cJSON_GetObjectItemCaseSensitive(j, "fontSize")->valuedouble < 0) { cJSON_DeleteTickConfig(x); return NULL; }
80938203 if (NULL != (x->font_size = cJSON_malloc(sizeof(double)))) {
80948204 *x->font_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "fontSize"));
80958205 }
@@ -8125,6 +8235,8 @@ struct TickConfig * cJSON_GetTickConfigValue(const cJSON * j) {
81258235 }
81268236 if (cJSON_HasObjectItem(j, "opacity")) {
81278237 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "opacity"))) { cJSON_DeleteTickConfig(x); return NULL; }
8238+ if (cJSON_GetObjectItemCaseSensitive(j, "opacity")->valuedouble < 0) { cJSON_DeleteTickConfig(x); return NULL; }
8239+ if (cJSON_GetObjectItemCaseSensitive(j, "opacity")->valuedouble > 1) { cJSON_DeleteTickConfig(x); return NULL; }
81288240 if (NULL != (x->opacity = cJSON_malloc(sizeof(double)))) {
81298241 *x->opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "opacity"));
81308242 }
@@ -8138,6 +8250,7 @@ struct TickConfig * cJSON_GetTickConfigValue(const cJSON * j) {
81388250 }
81398251 if (cJSON_HasObjectItem(j, "radius")) {
81408252 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "radius"))) { cJSON_DeleteTickConfig(x); return NULL; }
8253+ if (cJSON_GetObjectItemCaseSensitive(j, "radius")->valuedouble < 0) { cJSON_DeleteTickConfig(x); return NULL; }
81418254 if (NULL != (x->radius = cJSON_malloc(sizeof(double)))) {
81428255 *x->radius = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "radius"));
81438256 }
@@ -8148,6 +8261,7 @@ struct TickConfig * cJSON_GetTickConfigValue(const cJSON * j) {
81488261 }
81498262 if (cJSON_HasObjectItem(j, "size")) {
81508263 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "size"))) { cJSON_DeleteTickConfig(x); return NULL; }
8264+ if (cJSON_GetObjectItemCaseSensitive(j, "size")->valuedouble < 0) { cJSON_DeleteTickConfig(x); return NULL; }
81518265 if (NULL != (x->size = cJSON_malloc(sizeof(double)))) {
81528266 *x->size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "size"));
81538267 }
@@ -8180,18 +8294,23 @@ struct TickConfig * cJSON_GetTickConfigValue(const cJSON * j) {
81808294 }
81818295 if (cJSON_HasObjectItem(j, "strokeOpacity")) {
81828296 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity"))) { cJSON_DeleteTickConfig(x); return NULL; }
8297+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity")->valuedouble < 0) { cJSON_DeleteTickConfig(x); return NULL; }
8298+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity")->valuedouble > 1) { cJSON_DeleteTickConfig(x); return NULL; }
81838299 if (NULL != (x->stroke_opacity = cJSON_malloc(sizeof(double)))) {
81848300 *x->stroke_opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity"));
81858301 }
81868302 }
81878303 if (cJSON_HasObjectItem(j, "strokeWidth")) {
81888304 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "strokeWidth"))) { cJSON_DeleteTickConfig(x); return NULL; }
8305+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeWidth")->valuedouble < 0) { cJSON_DeleteTickConfig(x); return NULL; }
81898306 if (NULL != (x->stroke_width = cJSON_malloc(sizeof(double)))) {
81908307 *x->stroke_width = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "strokeWidth"));
81918308 }
81928309 }
81938310 if (cJSON_HasObjectItem(j, "tension")) {
81948311 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "tension"))) { cJSON_DeleteTickConfig(x); return NULL; }
8312+ if (cJSON_GetObjectItemCaseSensitive(j, "tension")->valuedouble < 0) { cJSON_DeleteTickConfig(x); return NULL; }
8313+ if (cJSON_GetObjectItemCaseSensitive(j, "tension")->valuedouble > 1) { cJSON_DeleteTickConfig(x); return NULL; }
81958314 if (NULL != (x->tension = cJSON_malloc(sizeof(double)))) {
81968315 *x->tension = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "tension"));
81978316 }
@@ -8208,6 +8327,7 @@ struct TickConfig * cJSON_GetTickConfigValue(const cJSON * j) {
82088327 }
82098328 if (cJSON_HasObjectItem(j, "thickness")) {
82108329 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "thickness"))) { cJSON_DeleteTickConfig(x); return NULL; }
8330+ if (cJSON_GetObjectItemCaseSensitive(j, "thickness")->valuedouble < 0) { cJSON_DeleteTickConfig(x); return NULL; }
82118331 if (NULL != (x->thickness = cJSON_malloc(sizeof(double)))) {
82128332 *x->thickness = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "thickness"));
82138333 }
@@ -8495,6 +8615,7 @@ struct VgTitleConfig * cJSON_GetVgTitleConfigValue(const cJSON * j) {
84958615 }
84968616 if (cJSON_HasObjectItem(j, "fontSize")) {
84978617 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "fontSize"))) { cJSON_DeleteVgTitleConfig(x); return NULL; }
8618+ if (cJSON_GetObjectItemCaseSensitive(j, "fontSize")->valuedouble < 0) { cJSON_DeleteVgTitleConfig(x); return NULL; }
84988619 if (NULL != (x->font_size = cJSON_malloc(sizeof(double)))) {
84998620 *x->font_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "fontSize"));
85008621 }
@@ -8506,6 +8627,7 @@ struct VgTitleConfig * cJSON_GetVgTitleConfigValue(const cJSON * j) {
85068627 }
85078628 if (cJSON_HasObjectItem(j, "limit")) {
85088629 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "limit"))) { cJSON_DeleteVgTitleConfig(x); return NULL; }
8630+ if (cJSON_GetObjectItemCaseSensitive(j, "limit")->valuedouble < 0) { cJSON_DeleteVgTitleConfig(x); return NULL; }
85098631 if (NULL != (x->limit = cJSON_malloc(sizeof(double)))) {
85108632 *x->limit = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "limit"));
85118633 }
@@ -9573,6 +9695,7 @@ struct BinParams * cJSON_GetBinParamsValue(const cJSON * j) {
95739695 }
95749696 if (cJSON_HasObjectItem(j, "maxbins")) {
95759697 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "maxbins"))) { cJSON_DeleteBinParams(x); return NULL; }
9698+ if (cJSON_GetObjectItemCaseSensitive(j, "maxbins")->valuedouble < 2) { cJSON_DeleteBinParams(x); return NULL; }
95769699 if (NULL != (x->maxbins = cJSON_malloc(sizeof(double)))) {
95779700 *x->maxbins = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "maxbins"));
95789701 }
@@ -9870,6 +9993,8 @@ struct DateTime * cJSON_GetDateTimeValue(const cJSON * j) {
98709993 memset(x, 0, sizeof(struct DateTime));
98719994 if (cJSON_HasObjectItem(j, "date")) {
98729995 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "date"))) { cJSON_DeleteDateTime(x); return NULL; }
9996+ if (cJSON_GetObjectItemCaseSensitive(j, "date")->valuedouble < 1) { cJSON_DeleteDateTime(x); return NULL; }
9997+ if (cJSON_GetObjectItemCaseSensitive(j, "date")->valuedouble > 31) { cJSON_DeleteDateTime(x); return NULL; }
98739998 if (NULL != (x->date = cJSON_malloc(sizeof(double)))) {
98749999 *x->date = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "date"));
987510000 }
@@ -9881,18 +10006,24 @@ struct DateTime * cJSON_GetDateTimeValue(const cJSON * j) {
988110006 }
988210007 if (cJSON_HasObjectItem(j, "hours")) {
988310008 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "hours"))) { cJSON_DeleteDateTime(x); return NULL; }
10009+ if (cJSON_GetObjectItemCaseSensitive(j, "hours")->valuedouble < 0) { cJSON_DeleteDateTime(x); return NULL; }
10010+ if (cJSON_GetObjectItemCaseSensitive(j, "hours")->valuedouble > 23) { cJSON_DeleteDateTime(x); return NULL; }
988410011 if (NULL != (x->hours = cJSON_malloc(sizeof(double)))) {
988510012 *x->hours = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "hours"));
988610013 }
988710014 }
988810015 if (cJSON_HasObjectItem(j, "milliseconds")) {
988910016 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "milliseconds"))) { cJSON_DeleteDateTime(x); return NULL; }
10017+ if (cJSON_GetObjectItemCaseSensitive(j, "milliseconds")->valuedouble < 0) { cJSON_DeleteDateTime(x); return NULL; }
10018+ if (cJSON_GetObjectItemCaseSensitive(j, "milliseconds")->valuedouble > 999) { cJSON_DeleteDateTime(x); return NULL; }
989010019 if (NULL != (x->milliseconds = cJSON_malloc(sizeof(double)))) {
989110020 *x->milliseconds = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "milliseconds"));
989210021 }
989310022 }
989410023 if (cJSON_HasObjectItem(j, "minutes")) {
989510024 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "minutes"))) { cJSON_DeleteDateTime(x); return NULL; }
10025+ if (cJSON_GetObjectItemCaseSensitive(j, "minutes")->valuedouble < 0) { cJSON_DeleteDateTime(x); return NULL; }
10026+ if (cJSON_GetObjectItemCaseSensitive(j, "minutes")->valuedouble > 59) { cJSON_DeleteDateTime(x); return NULL; }
989610027 if (NULL != (x->minutes = cJSON_malloc(sizeof(double)))) {
989710028 *x->minutes = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "minutes"));
989810029 }
@@ -9904,12 +10035,16 @@ struct DateTime * cJSON_GetDateTimeValue(const cJSON * j) {
990410035 }
990510036 if (cJSON_HasObjectItem(j, "quarter")) {
990610037 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "quarter"))) { cJSON_DeleteDateTime(x); return NULL; }
10038+ if (cJSON_GetObjectItemCaseSensitive(j, "quarter")->valuedouble < 1) { cJSON_DeleteDateTime(x); return NULL; }
10039+ if (cJSON_GetObjectItemCaseSensitive(j, "quarter")->valuedouble > 4) { cJSON_DeleteDateTime(x); return NULL; }
990710040 if (NULL != (x->quarter = cJSON_malloc(sizeof(double)))) {
990810041 *x->quarter = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "quarter"));
990910042 }
991010043 }
991110044 if (cJSON_HasObjectItem(j, "seconds")) {
991210045 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "seconds"))) { cJSON_DeleteDateTime(x); return NULL; }
10046+ if (cJSON_GetObjectItemCaseSensitive(j, "seconds")->valuedouble < 0) { cJSON_DeleteDateTime(x); return NULL; }
10047+ if (cJSON_GetObjectItemCaseSensitive(j, "seconds")->valuedouble > 59) { cJSON_DeleteDateTime(x); return NULL; }
991310048 if (NULL != (x->seconds = cJSON_malloc(sizeof(double)))) {
991410049 *x->seconds = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "seconds"));
991510050 }
@@ -10467,6 +10602,7 @@ struct Legend * cJSON_GetLegendValue(const cJSON * j) {
1046710602 }
1046810603 if (cJSON_HasObjectItem(j, "zindex")) {
1046910604 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "zindex"))) { cJSON_DeleteLegend(x); return NULL; }
10605+ if (cJSON_GetObjectItemCaseSensitive(j, "zindex")->valuedouble < 0) { cJSON_DeleteLegend(x); return NULL; }
1047010606 if (NULL != (x->zindex = cJSON_malloc(sizeof(double)))) {
1047110607 *x->zindex = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "zindex"));
1047210608 }
@@ -10962,18 +11098,23 @@ struct Scale * cJSON_GetScaleValue(const cJSON * j) {
1096211098 }
1096311099 if (cJSON_HasObjectItem(j, "padding")) {
1096411100 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "padding"))) { cJSON_DeleteScale(x); return NULL; }
11101+ if (cJSON_GetObjectItemCaseSensitive(j, "padding")->valuedouble < 0) { cJSON_DeleteScale(x); return NULL; }
1096511102 if (NULL != (x->padding = cJSON_malloc(sizeof(double)))) {
1096611103 *x->padding = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "padding"));
1096711104 }
1096811105 }
1096911106 if (cJSON_HasObjectItem(j, "paddingInner")) {
1097011107 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "paddingInner"))) { cJSON_DeleteScale(x); return NULL; }
11108+ if (cJSON_GetObjectItemCaseSensitive(j, "paddingInner")->valuedouble < 0) { cJSON_DeleteScale(x); return NULL; }
11109+ if (cJSON_GetObjectItemCaseSensitive(j, "paddingInner")->valuedouble > 1) { cJSON_DeleteScale(x); return NULL; }
1097111110 if (NULL != (x->padding_inner = cJSON_malloc(sizeof(double)))) {
1097211111 *x->padding_inner = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "paddingInner"));
1097311112 }
1097411113 }
1097511114 if (cJSON_HasObjectItem(j, "paddingOuter")) {
1097611115 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "paddingOuter"))) { cJSON_DeleteScale(x); return NULL; }
11116+ if (cJSON_GetObjectItemCaseSensitive(j, "paddingOuter")->valuedouble < 0) { cJSON_DeleteScale(x); return NULL; }
11117+ if (cJSON_GetObjectItemCaseSensitive(j, "paddingOuter")->valuedouble > 1) { cJSON_DeleteScale(x); return NULL; }
1097711118 if (NULL != (x->padding_outer = cJSON_malloc(sizeof(double)))) {
1097811119 *x->padding_outer = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "paddingOuter"));
1097911120 }
@@ -11591,6 +11732,8 @@ struct Header * cJSON_GetHeaderValue(const cJSON * j) {
1159111732 }
1159211733 if (cJSON_HasObjectItem(j, "labelAngle")) {
1159311734 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "labelAngle"))) { cJSON_DeleteHeader(x); return NULL; }
11735+ if (cJSON_GetObjectItemCaseSensitive(j, "labelAngle")->valuedouble < -360) { cJSON_DeleteHeader(x); return NULL; }
11736+ if (cJSON_GetObjectItemCaseSensitive(j, "labelAngle")->valuedouble > 360) { cJSON_DeleteHeader(x); return NULL; }
1159411737 if (NULL != (x->label_angle = cJSON_malloc(sizeof(double)))) {
1159511738 *x->label_angle = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "labelAngle"));
1159611739 }
@@ -12612,6 +12755,8 @@ struct Axis * cJSON_GetAxisValue(const cJSON * j) {
1261212755 }
1261312756 if (cJSON_HasObjectItem(j, "labelAngle")) {
1261412757 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "labelAngle"))) { cJSON_DeleteAxis(x); return NULL; }
12758+ if (cJSON_GetObjectItemCaseSensitive(j, "labelAngle")->valuedouble < -360) { cJSON_DeleteAxis(x); return NULL; }
12759+ if (cJSON_GetObjectItemCaseSensitive(j, "labelAngle")->valuedouble > 360) { cJSON_DeleteAxis(x); return NULL; }
1261512760 if (NULL != (x->label_angle = cJSON_malloc(sizeof(double)))) {
1261612761 *x->label_angle = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "labelAngle"));
1261712762 }
@@ -12688,6 +12833,7 @@ struct Axis * cJSON_GetAxisValue(const cJSON * j) {
1268812833 }
1268912834 if (cJSON_HasObjectItem(j, "tickSize")) {
1269012835 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "tickSize"))) { cJSON_DeleteAxis(x); return NULL; }
12836+ if (cJSON_GetObjectItemCaseSensitive(j, "tickSize")->valuedouble < 0) { cJSON_DeleteAxis(x); return NULL; }
1269112837 if (NULL != (x->tick_size = cJSON_malloc(sizeof(double)))) {
1269212838 *x->tick_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "tickSize"));
1269312839 }
@@ -12724,6 +12870,7 @@ struct Axis * cJSON_GetAxisValue(const cJSON * j) {
1272412870 }
1272512871 if (cJSON_HasObjectItem(j, "zindex")) {
1272612872 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "zindex"))) { cJSON_DeleteAxis(x); return NULL; }
12873+ if (cJSON_GetObjectItemCaseSensitive(j, "zindex")->valuedouble < 0) { cJSON_DeleteAxis(x); return NULL; }
1272712874 if (NULL != (x->zindex = cJSON_malloc(sizeof(double)))) {
1272812875 *x->zindex = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "zindex"));
1272912876 }
@@ -13704,6 +13851,8 @@ struct MarkDef * cJSON_GetMarkDefValue(const cJSON * j) {
1370413851 }
1370513852 if (cJSON_HasObjectItem(j, "angle")) {
1370613853 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "angle"))) { cJSON_DeleteMarkDef(x); return NULL; }
13854+ if (cJSON_GetObjectItemCaseSensitive(j, "angle")->valuedouble < 0) { cJSON_DeleteMarkDef(x); return NULL; }
13855+ if (cJSON_GetObjectItemCaseSensitive(j, "angle")->valuedouble > 360) { cJSON_DeleteMarkDef(x); return NULL; }
1370713856 if (NULL != (x->angle = cJSON_malloc(sizeof(double)))) {
1370813857 *x->angle = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "angle"));
1370913858 }
@@ -13756,6 +13905,8 @@ struct MarkDef * cJSON_GetMarkDefValue(const cJSON * j) {
1375613905 }
1375713906 if (cJSON_HasObjectItem(j, "fillOpacity")) {
1375813907 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "fillOpacity"))) { cJSON_DeleteMarkDef(x); return NULL; }
13908+ if (cJSON_GetObjectItemCaseSensitive(j, "fillOpacity")->valuedouble < 0) { cJSON_DeleteMarkDef(x); return NULL; }
13909+ if (cJSON_GetObjectItemCaseSensitive(j, "fillOpacity")->valuedouble > 1) { cJSON_DeleteMarkDef(x); return NULL; }
1375913910 if (NULL != (x->fill_opacity = cJSON_malloc(sizeof(double)))) {
1376013911 *x->fill_opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "fillOpacity"));
1376113912 }
@@ -13766,6 +13917,7 @@ struct MarkDef * cJSON_GetMarkDefValue(const cJSON * j) {
1376613917 }
1376713918 if (cJSON_HasObjectItem(j, "fontSize")) {
1376813919 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "fontSize"))) { cJSON_DeleteMarkDef(x); return NULL; }
13920+ if (cJSON_GetObjectItemCaseSensitive(j, "fontSize")->valuedouble < 0) { cJSON_DeleteMarkDef(x); return NULL; }
1376913921 if (NULL != (x->font_size = cJSON_malloc(sizeof(double)))) {
1377013922 *x->font_size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "fontSize"));
1377113923 }
@@ -13801,6 +13953,8 @@ struct MarkDef * cJSON_GetMarkDefValue(const cJSON * j) {
1380113953 }
1380213954 if (cJSON_HasObjectItem(j, "opacity")) {
1380313955 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "opacity"))) { cJSON_DeleteMarkDef(x); return NULL; }
13956+ if (cJSON_GetObjectItemCaseSensitive(j, "opacity")->valuedouble < 0) { cJSON_DeleteMarkDef(x); return NULL; }
13957+ if (cJSON_GetObjectItemCaseSensitive(j, "opacity")->valuedouble > 1) { cJSON_DeleteMarkDef(x); return NULL; }
1380413958 if (NULL != (x->opacity = cJSON_malloc(sizeof(double)))) {
1380513959 *x->opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "opacity"));
1380613960 }
@@ -13814,6 +13968,7 @@ struct MarkDef * cJSON_GetMarkDefValue(const cJSON * j) {
1381413968 }
1381513969 if (cJSON_HasObjectItem(j, "radius")) {
1381613970 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "radius"))) { cJSON_DeleteMarkDef(x); return NULL; }
13971+ if (cJSON_GetObjectItemCaseSensitive(j, "radius")->valuedouble < 0) { cJSON_DeleteMarkDef(x); return NULL; }
1381713972 if (NULL != (x->radius = cJSON_malloc(sizeof(double)))) {
1381813973 *x->radius = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "radius"));
1381913974 }
@@ -13824,6 +13979,7 @@ struct MarkDef * cJSON_GetMarkDefValue(const cJSON * j) {
1382413979 }
1382513980 if (cJSON_HasObjectItem(j, "size")) {
1382613981 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "size"))) { cJSON_DeleteMarkDef(x); return NULL; }
13982+ if (cJSON_GetObjectItemCaseSensitive(j, "size")->valuedouble < 0) { cJSON_DeleteMarkDef(x); return NULL; }
1382713983 if (NULL != (x->size = cJSON_malloc(sizeof(double)))) {
1382813984 *x->size = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "size"));
1382913985 }
@@ -13856,12 +14012,15 @@ struct MarkDef * cJSON_GetMarkDefValue(const cJSON * j) {
1385614012 }
1385714013 if (cJSON_HasObjectItem(j, "strokeOpacity")) {
1385814014 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity"))) { cJSON_DeleteMarkDef(x); return NULL; }
14015+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity")->valuedouble < 0) { cJSON_DeleteMarkDef(x); return NULL; }
14016+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity")->valuedouble > 1) { cJSON_DeleteMarkDef(x); return NULL; }
1385914017 if (NULL != (x->stroke_opacity = cJSON_malloc(sizeof(double)))) {
1386014018 *x->stroke_opacity = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "strokeOpacity"));
1386114019 }
1386214020 }
1386314021 if (cJSON_HasObjectItem(j, "strokeWidth")) {
1386414022 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "strokeWidth"))) { cJSON_DeleteMarkDef(x); return NULL; }
14023+ if (cJSON_GetObjectItemCaseSensitive(j, "strokeWidth")->valuedouble < 0) { cJSON_DeleteMarkDef(x); return NULL; }
1386514024 if (NULL != (x->stroke_width = cJSON_malloc(sizeof(double)))) {
1386614025 *x->stroke_width = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "strokeWidth"));
1386714026 }
@@ -13873,6 +14032,8 @@ struct MarkDef * cJSON_GetMarkDefValue(const cJSON * j) {
1387314032 }
1387414033 if (cJSON_HasObjectItem(j, "tension")) {
1387514034 if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "tension"))) { cJSON_DeleteMarkDef(x); return NULL; }
14035+ if (cJSON_GetObjectItemCaseSensitive(j, "tension")->valuedouble < 0) { cJSON_DeleteMarkDef(x); return NULL; }
14036+ if (cJSON_GetObjectItemCaseSensitive(j, "tension")->valuedouble > 1) { cJSON_DeleteMarkDef(x); return NULL; }
1387614037 if (NULL != (x->tension = cJSON_malloc(sizeof(double)))) {
1387714038 *x->tension = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "tension"));
1387814039 }
No generated files match these filters.