2011/9/11 Mo Cheng <morgan.chen...@gmail.com>:
> JSON might be more flexible. But, is HTML really more complex?
> Having related data as attribute started with "data-" is common practice to
> bind data to HTML
> <div data-id="xxx" data-foo="xxx" >
>    ...
> </div>

It is common, but parsing the DOM for some value is much costly then
parsing a JSON string, and you only need to do the parsing once, since
then it will be native. Although generating DOM from that JSON can be
costly, but that also needs to be done once.

-- 
Poetro

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/jsmentors@jsmentors.com/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/jsmentors@googlegroups.com/

To unsubscribe from this group, send email to
jsmentors+unsubscr...@googlegroups.com

Reply via email to