[Seaside] json parser patch

Boris Popov, DeepCove Labs boris at deepcovelabs.com
Mon Sep 12 18:34:19 UTC 2011


You totally lost me, are you saying that parser supports non-string keys
and still calls it JSON? I don't see it. If you're talking about how
they handle extensions, note that they still generate valid JSON with
string keys, for example, ranges,

 

json = JSON.generate [1, 2, {"a"=>3.141}, false, true, nil, 4..10]

# =>
"[1,2,{\"a\":3.141},false,true,null,{\"json_class\":\"Range\",\"data\":[
4,10,false]}]"

JSON.parse json

# => [1, 2, {"a"=>3.141}, false, true, nil, 4..10]

 

-Boris

 

From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of
Sebastian Sastre
Sent: Monday, September 12, 2011 2:29 PM
To: Seaside - general discussion
Subject: Re: [Seaside] json parser patch

 

with this you decide if you want a purist JSON parser or a sexy one

http://flori.github.com/json/

 

I must be a sinner then

 

sebastian <http://about.me/sebastianconcept> 

 

o/





 

 

 

On Sep 12, 2011, at 3:15 PM, Boris Popov, DeepCove Labs wrote:





There is no prize, JSON uses strings for keys, that is all. If you want
to parse some other format, by all means, but let's not go down the road
of supporting non-JSON in the JSON parser. Have you tried any of the
other JSON parsers? Do you know of any that support something other than
strings for object keys?

 

-Boris

 

From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf
OfSebastian Sastre
Sent: Monday, September 12, 2011 2:13 PM
To: Seaside - general discussion
Subject: Re: [Seaside] json parser patch

 

yes, yes...

 

it seems that if you don't use them you miss the blessing of the pope 

 

...in planet Earth though nobody really cares.

 

Which makes sense because you:

1. need it in javascript like a property of something deserialized or

2. need it deserialized in the server side, also as a key/property of
something. And chances are those double quotes are mere bureaucracy that
will require code to unwrap.

 

To all,

 

I'm not convinced of enforcing that fruitless rule is being smart.

 

Are you? if so what's the prize of respecting it?

 

sebastian <http://about.me/sebastianconcept> 

 

o/

 

 

On Sep 12, 2011, at 2:59 PM, Torsten Bergmann wrote:






	I am missing something?


http://stackoverflow.com/questions/949449/json-spec-does-the-key-have-to
-be-surrounded-with-quotes
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

 

 

 

 

_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110912/396b919b/attachment.htm


More information about the seaside mailing list