summaryrefslogtreecommitdiff
path: root/src/json.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-12-11 15:08:03 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-12-11 15:08:03 +0000
commit763abd8c8fc32b29c5f989cd0d4cab1b6e472997 (patch)
tree4ff54223e8526dbb20e9fe87e9c21d9a3b80975c /src/json.c
parent0d08a471f9ebfdfadded6c92abc700c706475644 (diff)
oops, no tabs. (indent -kr -nut)
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/json.c b/src/json.c
index 806ab3e..0ffc2fa 100644
--- a/src/json.c
+++ b/src/json.c
@@ -52,30 +52,30 @@ JsonObject *trg_deserialize(trg_response * response, GError ** error)
parser = json_parser_new();
json_parser_load_from_data(parser, response->raw, response->size,
- error);
+ error);
if (*error == NULL) {
- root = json_parser_get_root(parser);
+ root = json_parser_get_root(parser);
#ifdef DEBUG
- if (g_getenv("TRG_SHOW_INCOMING") != NULL) {
- g_debug("<=(INcoming)<=: %s", response->raw);
- } else if (g_getenv("TRG_SHOW_INCOMING_PRETTY") != NULL) {
- JsonGenerator *pg;
- gsize len;
- gchar *pgdata;
-
- pg = json_generator_new();
- g_object_set(pg, "pretty", TRUE, NULL);
- json_generator_set_root(pg, root);
-
- pgdata = json_generator_to_data(pg, &len);
- g_debug("<=(incoming)<=:\n%s\n", pgdata);
- g_free(pgdata);
-
- g_object_unref(pg);
- }
+ if (g_getenv("TRG_SHOW_INCOMING") != NULL) {
+ g_debug("<=(INcoming)<=: %s", response->raw);
+ } else if (g_getenv("TRG_SHOW_INCOMING_PRETTY") != NULL) {
+ JsonGenerator *pg;
+ gsize len;
+ gchar *pgdata;
+
+ pg = json_generator_new();
+ g_object_set(pg, "pretty", TRUE, NULL);
+ json_generator_set_root(pg, root);
+
+ pgdata = json_generator_to_data(pg, &len);
+ g_debug("<=(incoming)<=:\n%s\n", pgdata);
+ g_free(pgdata);
+
+ g_object_unref(pg);
+ }
#endif
- ret = json_node_get_object(root);
- json_object_ref(ret);
+ ret = json_node_get_object(root);
+ json_object_ref(ret);
}
g_object_unref(parser);