X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=bindings%2Fsamples%2FHelloWorld.c;h=15544895842f0443f0d2c6077b9a7dbb9ed90163;hb=904f490e7d70653bb54b53d3bc7c7bead45be844;hp=b6f49b78c876a293387821e42fc2d67ce333b0fe;hpb=7059e59cddc1c81321639875636e88895bc14309;p=src%2Fapp-framework-binder.git diff --git a/bindings/samples/HelloWorld.c b/bindings/samples/HelloWorld.c index b6f49b78..15544895 100644 --- a/bindings/samples/HelloWorld.c +++ b/bindings/samples/HelloWorld.c @@ -144,16 +144,16 @@ static void pingEvent(struct afb_req request) // For samples https://linuxprograms.wordpress.com/2010/05/20/json-c-libjson-tutorial/ static void pingJson (struct afb_req request) { - json_object *jresp, *embed; - + json_object *jresp, *embed; + jresp = json_object_new_object(); json_object_object_add(jresp, "myString", json_object_new_string ("Some String")); json_object_object_add(jresp, "myInt", json_object_new_int (1234)); - + embed = json_object_new_object(); json_object_object_add(embed, "subObjString", json_object_new_string ("Some String")); json_object_object_add(embed, "subObjInt", json_object_new_int (5678)); - + json_object_object_add(jresp,"eobj", embed); ping(request, jresp, "pingJson");