|
|
| Article: |
An Introduction to JSON
|
| Subject: |
no golden rule, imho |
| Date: |
2007-03-07 01:03:12 |
| From: |
biblio |
|
|
|
Of course, the choice of data transfer in XML, Json or maybe a simple string has been to be made depending on the situation. If the DOM manipulation you need to do is to update a huge div in some complex way, using Json might be cumbersome. You might choose to use xml+xslt combination to output html and assign it to the div afresh. You have to make a choice between OO programming ease and markup manipulation.
Also, you might choose to use Json at places other than Ajax calls. In my web application I needed to convert Java arrays and maps to javascript objects. Saying JSONSerializer.toJSON(obj)[from JSON-lib at source forge] was all that I needed to do. |
|