Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- George Jempty
April 5, 2005, 4:30 pm
rate this thread
- Lasse Reichstein Nielsen
April 6, 2005, 2:17 am
Re: json-php on slashdot
I must admit, I fail to see the point of your journal entry. It appears
to try to point out problems with JSON, but which problems? And are
they JSON problems or strawmen? (I'm leaning towards the latter).
quote: "This same sample data file specified as the src attribute of a
Well, what did you expect?
JSON is a *value* description language. It is a subset of ECMAScript's
literal notation, which is *expression* syntax. When you try loading
and evaluating it as a statement, it fails.
If you fetch the text using XMLHttpRequest and evaluates it using
"eval", then it works perfectly (and if you are targeting a browser
only, it's a much better format to send your data in than, e.g., XML).
You have a language for expression values. You want these values to
be available to your code, so you must have some way of getting the
text and parsing it.
assignment and load the assignment into a script tag on a web page.
That does not make the assignment part of the JSON value, nor
does it need to be.
But, looking at the *first* answer in the PHP-JSON thread linked to,
all this has already been said.
Ah, I now see that you are the "scriptify" of that conversation.
I'll just chip in and say that Michal Migurski is *absolutely right*.
From what you have written so far, I am not able to see a need that
cannot be solved using PHP and the JSON library. If you can express
your need more clearly, I am certain we can find a way to fulfill it.
(On the other hand, the "sample data for a C# parser" does have an
error. It should not end with a semicolon).
Lasse Reichstein Nielsen - email@example.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html
'Faith without judgement merely degrades the spirit divine.'