Squashed commit of the following: commit 1ad29ec164b9f07781f68fbe39276428105e3d8e Author: Thomas Mayer <thomas@residuum.org> Date: Fri Aug 10 20:51:42 2012 +0200 Test for json-c actually outputs something instead of just return 0 or 1. commit 2650c38c79a627f25c7dda9e89dd1acaca8d3663 Author: Thomas Mayer <thomas@residuum.org> Date: Sat Aug 4 16:46:28 2012 +0200 Test case for json-c.pull/65/head
parent
1bced16c88
commit
5763978027
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* This file is part of MXE.
|
||||
* See index.html for further information.
|
||||
*/
|
||||
|
||||
#include <json/json.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
json_object *jobj;
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
jobj = json_object_new_object();
|
||||
if (!jobj) {
|
||||
return 1;
|
||||
}
|
||||
json_object_object_add(jobj, "key", json_object_new_string("value"));
|
||||
printf("%s", json_object_to_json_string(jobj));
|
||||
return 0;
|
||||
}
|
Loading…
Reference in new issue