This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
Register
Sign In
jdk-build-libs
/
json-c
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
11
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
Fixed misalignment in JSON string due to space after \n being printed when choosing JSON_C_TO_STRING_SPACED together with JSON_C_TO_STRING_PRETTY in json_object_array_to_json_string
tags/json-c-0.14-20200419
Darjan Krijan
6 years ago
parent
ebe520e96e
commit
e8cec5c9e4
1 changed files
with
2 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-2
json_object.c
+ 2
- 2
json_object.c
View File
@@ -395,7 +395,7 @@ static int json_object_object_to_json_string(struct json_object* jso,
printbuf_strappend(pb, "\n");
}
had_children = 1;
if (flags & JSON_C_TO_STRING_SPACED)
if (flags & JSON_C_TO_STRING_SPACED
&& !(flags & JSON_C_TO_STRING_PRETTY)
)
printbuf_strappend(pb, " ");
indent(pb, level+1, flags);
printbuf_strappend(pb, "\"");
@@ -416,7 +416,7 @@ static int json_object_object_to_json_string(struct json_object* jso,
printbuf_strappend(pb, "\n");
indent(pb,level,flags);
}
if (flags & JSON_C_TO_STRING_SPACED)
if (flags & JSON_C_TO_STRING_SPACED
&& !(flags & JSON_C_TO_STRING_PRETTY)
)
return printbuf_strappend(pb, /*{*/ " }");
else
return printbuf_strappend(pb, /*{*/ "}");
Write
Preview
Loading…
Cancel
Save