<empiricists> <name> <first>David</first> <last>Hume</last> </name> <name> <first>John</first> <last>Locke</last> </name> <name> <first>George</first> <last>Berkeley</last> </name> </empiricists> {"empiricists": [ {"name": { "first": "David", "last": "Hume" }}, {"name": { "first": "John", "last": "Locke" }}, {"name": { "first": "George", "last": "Berkeley" }}, ] } There are two basic data structures used in the above example:
Since JSON matches the JavaScript array and object notation perfectly, instead of parsing the contents with a sophisticated parse, the JavaScript eval() function can be used instead. |