Mohsin26 / as3corelib

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

multiple successive comments in JSON produce an error #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
having <white><comments><white><comments> will produce this error: [Fault]
exception, information=JSONParseError: Unexpected / encountered

this is an error in JSONTokenizer::skipIgnored:

private function skipIgnored():void {
    skipWhite();
    skipComments();
    skipWhite();            
}

replacing by the following will work:

private function skipIgnored():void {
    var pos:int;
    do {
        pos = this.loc;
        skipWhite();
        skipComments();
    } while (pos != this.loc);
}

modified file and patch attached.

Original issue reported on code.google.com by back2...@web.de on 21 Oct 2008 at 10:43

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by darron.schall on 23 Oct 2008 at 2:19

GoogleCodeExporter commented 9 years ago

Original comment by darron.schall on 23 Oct 2008 at 2:20

GoogleCodeExporter commented 9 years ago
Fixed in revision 64 - http://code.google.com/p/as3corelib/source/detail?r=64

Thanks for submitting the patch!

Original comment by darron.schall on 23 Oct 2008 at 2:30