yilmazzgokhann / google-refine

Automatically exported from code.google.com/p/google-refine
0 stars 0 forks source link

JSON importer should not deserialize nulls as the string "null" #596

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If you import a JSON file containing the JSON keyword "null" it gets 
interpreted as the literal string "null" which is incorrect.

We should probably double check "true" and "false" as well.

Original issue reported on code.google.com by tfmorris on 3 Aug 2012 at 6:08

GoogleCodeExporter commented 8 years ago
The JSON importer was handling all values as strings and then attempting 
reparse them itself.  In r2543 I've extended the tree parse framework (used by 
JSON & XML) to support any Serializable data type that Refine supports.  All 
parsing is now handled by the JSON parser and no strings are touched by default 
(before it was trimming whitespace and skipping empty strings - issue 578).

All JSON keywords are supported including null, true, & false.  Each is 
imported as the appropriate type directly.

All number parsing is done by the JSON parser and range has been extended to 
support Doubles (only Floats were supported before).

Options are available to trim white space, skip empty strings and attempt to 
parse strings as numbers which can be used to restore the previous behavior, 
but they're all off by default.

Original comment by tfmorris on 8 Sep 2012 at 1:30

GoogleCodeExporter commented 8 years ago

Original comment by tfmorris on 18 Sep 2012 at 3:05

GoogleCodeExporter commented 8 years ago

Original comment by tfmorris on 18 Sep 2012 at 4:56

GoogleCodeExporter commented 8 years ago

Original comment by tfmorris on 18 Sep 2012 at 5:52