Changeset: 2f803306b27b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2f803306b27b
Modified Files:
monetdb5/modules/atoms/json_atom.c
sql/test/json/Tests/pgexample.stable.out
sql/test/json/Tests/spaceissue.stable.out
Branch: default
Log Message:
Fixing the JSON rendering bug
diffs (53 lines):
diff --git a/monetdb5/modules/atoms/json_atom.c
b/monetdb5/modules/atoms/json_atom.c
--- a/monetdb5/modules/atoms/json_atom.c
+++ b/monetdb5/modules/atoms/json_atom.c
@@ -1554,7 +1554,6 @@ JSONtextInternal(char *result, char *val
if ( *s =='[' || *s ==']' || *s == '{' || *s == '}' || *s ==
',')
continue;
if ( *s == '"'){
- *result++ = ' ';
for(s++; *s && *s != '"'; s++)
if ( *s == '\\')
switch (*++s){
@@ -1573,7 +1572,6 @@ JSONtextInternal(char *result, char *val
}
else
*result++ = *s;
- *result++ = ' ';
} else
*result++ = *s;
}
diff --git a/sql/test/json/Tests/pgexample.stable.out
b/sql/test/json/Tests/pgexample.stable.out
--- a/sql/test/json/Tests/pgexample.stable.out
+++ b/sql/test/json/Tests/pgexample.stable.out
@@ -54,14 +54,14 @@ Ready.
% sys.L, sys.L # table_name
% f1, json_text_b # name
% json, clob # type
-% 20, 16 # length
-[ "[\"Hi I'm \\\"Daisy\\\"\"]", " Hi I'm \"Daisy\" " ]
+% 20, 14 # length
+[ "[\"Hi I'm \\\"Daisy\\\"\"]", "Hi I'm \"Daisy\"" ]
#SELECT json_path(b,'f1[0]') as f1_0 , json_text(b,'f1[0]')FROM jsonTbl WHERE
a = 3;
% sys.L, sys.L # table_name
% f1_0, json_text_b # name
% json, clob # type
-% 25, 17 # length
-[ "[[1,\"Robert \\\"M\\\"\",true]]", "1 Robert \"M\" true" ]
+% 25, 15 # length
+[ "[[1,\"Robert \\\"M\\\"\",true]]", "1Robert \"M\"true" ]
#drop table jsonTbl;
# 02:53:37 >
diff --git a/sql/test/json/Tests/spaceissue.stable.out
b/sql/test/json/Tests/spaceissue.stable.out
--- a/sql/test/json/Tests/spaceissue.stable.out
+++ b/sql/test/json/Tests/spaceissue.stable.out
@@ -68,7 +68,7 @@ Ready.
% sys.L # table_name
% json_text_js # name
% clob # type
-% 22 # length
+% 20 # length
[ "indoorDeviceLocation" ]
#select json_text(js, 'message') = 'indoorDeviceLocation' from txt;
% sys.L # table_name
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list