Skip to content

Commit

Permalink
json: store empty const char* as "", not as null
Browse files Browse the repository at this point in the history
this is how binary I/O works.
Empty string or null will be always restored as empty string

Signed-off-by: Sergey Linev <[email protected]>
  • Loading branch information
linev authored and pcanal committed Nov 7, 2016
1 parent 61ed54c commit 3257279
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion io/io/src/TBufferJSON.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@ void TBufferJSON::PerformPostProcessing(TJSONStackObj *stack,

if (isCharStar) {
stack->fValues.Delete();
if (fValue == "0") fValue = "null";
if (fValue == "0") fValue = "\"\"";
} else if (isTString || isSTLstring) {
// just remove all kind of string length information

Expand Down

0 comments on commit 3257279

Please sign in to comment.