summaryrefslogtreecommitdiff
path: root/tests/test1.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test1.c')
-rw-r--r--tests/test1.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test1.c b/tests/test1.c
index 01796ab..befd246 100644
--- a/tests/test1.c
+++ b/tests/test1.c
@@ -311,6 +311,11 @@ int main(int argc, char **argv)
{
printf("\t%s: %s\n", key, json_object_to_json_string(val));
}
+
+ json_object *empty_array = json_object_new_array();
+ json_object *empty_obj = json_object_new_object();
+ json_object_object_add(my_object, "empty_array", empty_array);
+ json_object_object_add(my_object, "empty_obj", empty_obj);
printf("my_object.to_string()=%s\n", json_object_to_json_string(my_object));
json_object_put(my_array);