blob: 543803e5e54aa4ca2df975a9ee1eb71e1538e874 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include <stdlib.h>
#include <stdio.h>
#include <json-glib/json-glib.h>
static const gchar *test_empty = "";
int
main (int argc, char *argv[])
{
JsonParser *parser;
GError *error = NULL;
g_type_init ();
parser = json_parser_new ();
if (!json_parser_load_from_data (parser, test_empty, -1, &error))
{
g_print ("Error: %s\n", error->message);
g_error_free (error);
g_object_unref (parser);
return EXIT_FAILURE;
}
g_assert (NULL == json_parser_get_root (parser));
g_object_unref (parser);
return EXIT_SUCCESS;
}
|