2 * Copyright (c) 2009-2013 Petri Lehtinen <petri@digip.org>
4 * Jansson is free software; you can redistribute it and/or modify
5 * it under the terms of the MIT license. See LICENSE for details.
7 /*See the LICENSE file in the jansson source distribution.
10 #ifndef json_object_foreach
11 #define json_object_foreach(object, key, value) \
12 for(key = json_object_iter_key(json_object_iter(object)); \
13 key && (value = json_object_iter_value(json_object_key_to_iter(key))); \
14 key = json_object_iter_key(json_object_iter_next(object, json_object_key_to_iter(key))))
17 #ifndef json_array_foreach
18 #define json_array_foreach(array, index, value) \
20 index < json_array_size(array) && (value = json_array_get(array, index)); \