I cannot say that my answer is the correct one, but I believe that
it's because it's simply adequate.

XML is great when you need to define a protocol, for when there's
something you have to describe (probably a language), and when you
want to take advantage of hardware acceleration (there's some crazy
hardware out there that works specially fine with XML).

Now, here you're talking about asynchronous communications which
pretty much transfers JavaScript objects (or at least data that must
be manipulated with JavaScript). That means that 1) there's a
bandwidth issue, where JSON is cleaner than XML and provides better
performance for large data transfers and 2) JSON is naturally a subset
of JavaScript object notation, so it's rather consequential that you
want to use it if you're going to be manipulating data with JavaScript
(passing JavaScript objects between background scripts and content
scripts feels very simple using JSON).

At least this is how I feel. I could be wrong or just partially
correct.

On Dec 23, 2:25 pm, "Nate W." <[email protected]> wrote:
> I suppose this is more of a general scripting/programming question
> than anything, but its applications with Chrome are unclear to me.
>
> Unless I am mistaken, Chrome extensions utilise JSON within its
> JavaScript code for asynchronous client server communication as
> opposed to XML. I have been told that the choice between XML and JSON
> is a matter of which one best fits the data model. Perhaps somebody
> could expand on that so I can be better educated on the matter. Thanks
> very much!

--

You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en.


Reply via email to