For the current version of both Chrome and Firefox, it doesn't happen 
anymore:
typeof JSON.parse('false') == "boolean"
typeof JSON.parse("false") == "boolean"


On Wednesday, January 8, 2014 at 11:33:37 AM UTC, Mark Volkmann wrote:
>
> I think it's interesting that browsers, at least Chrome, handle this the 
> way I expected.
>
> If you run this in the dev tools console, you'll get boolean:
> typeof JSON.parse('false')
>
> If you run this, you'll get string:
> typeof JSON.parse('"false"')
>
> Does Angular use it's own JSON parser instead of the JSON.parse?
>
>
> On Wed, Jan 8, 2014 at 12:14 AM, Sander Elias <[email protected] 
> <javascript:>> wrote:
>
>> Daniel,
>>
>> It was never on the original spec (JSON.org). I wasn't aware of the rfc. 
>> I did write an JSON parser, and during that, I found out that Crockfords 
>> own reference parser didn't handle the single value either. I think that's 
>> where the confusion came from.
>>
>> Regards
>> Sander
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "AngularJS" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> R. Mark Volkmann
> Object Computing, Inc. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to