projects
/
jansson.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make json_pack/json_unpack() recursive
[jansson.git]
/
src
/
dump.c
diff --git
a/src/dump.c
b/src/dump.c
index
c55d332
..
42eb256
100644
(file)
--- a/
src/dump.c
+++ b/
src/dump.c
@@
-41,8
+41,8
@@
static int dump_to_file(const char *buffer, int size, void *data)
return 0;
}
return 0;
}
-/*
256
spaces (the maximum indentation size) */
-static char whitespace[] = "
";
+/*
32
spaces (the maximum indentation size) */
+static char whitespace[] = " ";
static int dump_indent(size_t flags, int depth, int space, dump_func dump, void *data)
{
static int dump_indent(size_t flags, int depth, int space, dump_func dump, void *data)
{
@@
-185,7
+185,9
@@
static int do_dump(const json_t *json, size_t flags, int depth,
char buffer[MAX_INTEGER_STR_LENGTH];
int size;
char buffer[MAX_INTEGER_STR_LENGTH];
int size;
- size = snprintf(buffer, MAX_INTEGER_STR_LENGTH, "%li", json_integer_value(json));
+ size = snprintf(buffer, MAX_INTEGER_STR_LENGTH,
+ "%" JSON_INTEGER_FORMAT,
+ json_integer_value(json));
if(size >= MAX_INTEGER_STR_LENGTH)
return -1;
if(size >= MAX_INTEGER_STR_LENGTH)
return -1;