zzycami / touchcode

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

scanJSONdictionary does not read the closing } #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a complex JSON string that contains a dictionary not as the
outermost container (eg an Array of Dictionaries), try to parse.

What is the expected output? 
A parsed object

What do you see instead?
A cryptic error message

What version of the product are you using? On what operating system?
Latest from SVN, iPhone beta 7

Please provide any additional information below.

The bug can be solved by adding the following code at line 231 in
CJSONScanner.m:
    if ([self scanCharacter:'}'] == NO)
        {
        if (outError)
            {
            *outError = [NSError errorWithDomain:@"CJSONScannerErrorDomain" code:-5
userInfo:NULL];
            }
        }

Original issue reported on code.google.com by dmcl...@gmail.com on 24 Jun 2008 at 11:25

GoogleCodeExporter commented 8 years ago
Fixed in r83. All unit tests pass.

Original comment by jwight on 25 Jun 2008 at 1:59