|
I always use NextStep classic PLists
|
Posted: Nov 3, 2005 10:39 AM
|
|
I have parsers for these in various languages, they take very little code to write and they map directly to collection classes which means you don't need to make up a new DOM.
Dictionary: { key = value; key2 = value2; } Array: ( item1, item2, item3, ) Element: "C style string literal" | single-token
That's it. Items can nest any way you like, you can use an array or dictionary for a key or value.
{ cd = { title = "Maggie May"; artist = "Rod Stewart"; country = UK; company = Pickwick; price = 8.50; year = 1990; } }
This format is over ten years old and has wide support. I use it as serialization protocol and use language collection libraries to represent the items, so in Java you get Maps, Lists and Strings, in ObjectiveC its NSDictionary, NSArray, and NSString, in Smalltalk it is Dictionary, Array, String, etc.
|
|