talatabao / as3corelib

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

JSON decode blows up when encountering a carriage return #95

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set up a test json file containing:
    {
"key":"val"
} ... note the carriage returns in there (so the raw json would actually
look like "{\r\n"key":"val"\r\n}" )

2. Try to do a JSON.decode() on the data.
3. Profit?

What is the expected output? What do you see instead?
  When a carriage return is encountered, the decoder fails with an error of:
"Unexpected 
 encountered"
Which should actually read "Unexpected \r encountered", as apparently the
console output translates the \r.  It SHOULD just parse the \r and ignore
it ( carriage return appears to be valid JSON, as per
http://tools.ietf.org/html/rfc4627 ).

What version of the product are you using? On what operating system?
This is using as3corelib v0.90  on Mac OS 10.5.6, flexbuilder 3.0.2 with
flex sdk 3.2

Please provide any additional information below.

Original issue reported on code.google.com by caleb.r...@gmail.com on 19 Feb 2009 at 11:48

GoogleCodeExporter commented 9 years ago
This has been fixed since r38.  Trying using build .92.1 from the downloads 
page, or pull the latest code from 
the trunk.

Original comment by darron.schall on 3 Aug 2009 at 12:35

GoogleCodeExporter commented 9 years ago

Original comment by darron.schall on 3 Aug 2009 at 12:36