Hi all,
Some macros defined in jansson.h causes build error "assignment within conditional expression" on Visual Studio.
In order to not suppressing this error by using build option, how do you think to revise those macros a little bit like below?
Thanks
Abner
For example, revise below macro...
#define json_object_foreach(object, key, value) \
for (key = json_object_iter_key(json_object_iter(object)); \
key && (value = json_object_iter_value(json_object_key_to_iter(key))); \
key = json_object_iter_key( \
json_object_iter_next(object,
json_object_key_to_iter(key))))
to,
#define json_object_foreach(object, key, value) \
for (key = json_object_iter_key(json_object_iter(object)); \
key; \
key = json_object_iter_key( \
json_object_iter_next(object, json_object_key_to_iter(key)))) { \
value = json_object_iter_value(json_object_key_to_iter(key)); \
if (!value) \
break; \
}