Hi! I was messing with the json.reader lib yesterday and found a few  
problems--it failed to parse when there was more than one bit of  
whitespace between tokens, it choked on any leading whitespace in the  
input string, it would treat "e+2" as a negative exponent in a float  
literal, and it didn't understand C-style escape codes in string  
literals. In my git repo (git://repo.or.cz/factor/jcg.git ; my own box  
died, unfortunately) there's now a test suite which exercises all  
these problems along with fixes to the implementation.

While I was in there, I also made some behavior modifications: JSON  
"true" and "false" now parse into factor "t" and "f", and "null"  
parses to a symbol "json-null" I defined in the json.reader vocab.  
Before, they would parse to Factor strings "true", "false", and  
"null", which leaves some ambiguity as to whether the original JSON  
value was null or the string literal "null". It didn't look like any  
other libraries in extra/ were using json.reader, so I think these are  
reasonable changes to make.

-Joe

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to