Post #198,946
3/16/05 8:58:05 AM
|
JSON
[link|http://www.crockford.com/JSON/|http://www.crockford.com/JSON/]
Looks suspiciously familiar... but they've left a certain language off the list.
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #198,990
3/16/05 11:26:50 AM
|
That language is included in the first paragraph.
I saw the similarity upon looking at it.
-- [link|mailto:greg@gregfolkert.net|greg], [link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey[link|http://it.slashdot.org/comments.pl?sid=134485&cid=11233230|"Microsoft Security" is an even better oxymoron than "Military Intelligence"] No matter how much Microsoft supporters whine about how Linux and other operating systems have just as many bugs as their operating systems do, the bottom line is that the serious, gut-wrenching problems happen on Windows, not on Linux, not on Mac OS. -- [link|http://www.eweek.com/article2/0,1759,1622086,00.asp|source]
|
Post #198,998
3/16/05 11:41:21 AM
|
Not the one *I'm* thinking of...
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #199,006
3/16/05 11:47:01 AM
|
Hmmm...
I guess, I am completely at a loss then.
-- [link|mailto:greg@gregfolkert.net|greg], [link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey[link|http://it.slashdot.org/comments.pl?sid=134485&cid=11233230|"Microsoft Security" is an even better oxymoron than "Military Intelligence"] No matter how much Microsoft supporters whine about how Linux and other operating systems have just as many bugs as their operating systems do, the bottom line is that the serious, gut-wrenching problems happen on Windows, not on Linux, not on Mac OS. -- [link|http://www.eweek.com/article2/0,1759,1622086,00.asp|source]
|
Post #199,007
3/16/05 11:47:22 AM
|
Re: Hmmm...
JSON looks suspiciously like Objective C property files...
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #199,013
3/16/05 11:53:02 AM
|
migosh.
That would make complete sense.
But, I am not sure why you wouldn't use an XML interchange versus JSON interchange.
-- [link|mailto:greg@gregfolkert.net|greg], [link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey[link|http://it.slashdot.org/comments.pl?sid=134485&cid=11233230|"Microsoft Security" is an even better oxymoron than "Military Intelligence"] No matter how much Microsoft supporters whine about how Linux and other operating systems have just as many bugs as their operating systems do, the bottom line is that the serious, gut-wrenching problems happen on Windows, not on Linux, not on Mac OS. -- [link|http://www.eweek.com/article2/0,1759,1622086,00.asp|source]
|
Post #199,019
3/16/05 11:59:27 AM
|
Re: migosh.
[link|http://www.crockford.com/JSON/xml.html|http://www.crockford.com/JSON/xml.html]
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #199,045
3/16/05 1:25:48 PM
8/21/07 6:41:10 AM
|
Its not plists though
its gratuitously different.
Why not just support plists? Heck, we use them all over the place here for config data.
"Whenever you find you are on the side of the majority, it is time to pause and reflect" --Mark Twain
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them." --Albert Einstein
"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses." --George W. Bush
|
Post #199,053
3/16/05 2:18:31 PM
|
Re: Its not plists though
Might be because they got it from Python instead then.
It looked the same to me, but I don't use plists every day.
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #199,063
3/16/05 3:57:44 PM
8/21/07 6:41:22 AM
|
Re: Its not plists though
Plists
Dict = {} Array = ()
"Whenever you find you are on the side of the majority, it is time to pause and reflect" --Mark Twain
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them." --Albert Einstein
"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses." --George W. Bush
|
Post #199,066
3/16/05 4:04:27 PM
|
If that's the only change it's easy enough to make.
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #199,098
3/16/05 6:06:49 PM
8/21/07 12:37:46 PM
|
Not sure that's the only one
just the obvious one.
Dict: { key = value; } Array: ( one, two, three, ) or ( one, two, three ) String: token or "quoted string"
C style comments and escapes (\\n\\t...) are allowed.
You can write a recursive descent parser in about 4 functions, each about 5 lines each.
"Whenever you find you are on the side of the majority, it is time to pause and reflect" --Mark Twain
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them." --Albert Einstein
"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses." --George W. Bush
|
Post #199,008
3/16/05 11:48:09 AM
|
I give up.
But I'm starting to get annoyed at how many of my Google searches lately have JSON near the top of the list. Who needs JSON when you have eval()?
|
Post #199,009
3/16/05 11:50:22 AM
|
?
JSON isn't code, it's a data format. What does that have to do with eval()?
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #199,014
3/16/05 11:53:46 AM
|
It's a data format that has to be parsed by code.
Even their "JSON in Javascript" page has parsing/JSON-object-production code.
|
Post #199,018
3/16/05 11:58:37 AM
|
Every data format has to be parsed.
I still don't see your point with respect to eval()...
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #199,043
3/16/05 1:15:40 PM
|
I'm misleading myself
Looks like they already use eval() to convert JSON to JS. I saw the JS-to-JSON "stringify" code and must have assumed there were equally ugly conversions in the other direction.
|
Post #199,016
3/16/05 11:57:01 AM
|
I may be missing something
The only advantage I see is that it removes the distinction of attributes vs elements. Which I think is a good thing, btw, but when I control the interchange format I've already decided not to use attributes in XML. So what else does this gain me?
===
Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats]. [link|http://DocHope.com|http://DocHope.com]
|
Post #199,020
3/16/05 11:59:31 AM
|
Re: I may be missing something
[link|http://www.crockford.com/JSON/xml.html|http://www.crockford.com/JSON/xml.html]
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #199,025
3/16/05 12:07:57 PM
|
We just did this today
If someone else sends me a dtd that I have to use, I have no choice. When I have a choice, I can feed any data structure into the PEAR xml serializer, and unserializer on the other end, and get the same data structure back. Easy.
All the added complexity[1] of xml is the layers of validation to make sure you get the right data structure. If you don't need the validation you don't need to check the dtd.
[1] Other than attributes, which I think are a fundamentally broken idea.
===
Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats]. [link|http://DocHope.com|http://DocHope.com]
|