For what it's worth, I'd like to throw my vote in with the JSON crowd, if it's not too late to change. I was looking at the 'group' example on page 12, and I realized that the format is really just a reinvented JSON. There are already a good many JSON libraries out there, for many languages. I'd also bet it's less overhead than maintaining a Lua environment simply for the purposes of parsing, and it doesn't bring with it the concerns about sending or calling functions from the data. It was mentioned that most formats have drawbacks, but since this one is semantically identical to JSON, there's no harm and a whole lot of good switching can do.
I took the time to convert the 'groups' example (page 12) to JSON. It's syntactically correct JSON (as per [1]), and you can see the clear similarities to the Lua-based format. The only semantic change I made is the ["group", {<parameters>}] root object, because it made more "abstract" sense to me than {"group": {<parameters>}}. It's a stylistic choice I suppose, but both could be effectively equal to Lua's group = {<parameters>}.
As a slightly humorous point also, you could maintain your Lua environment and include a Lua-based JSON library.
[
"group",
{
"me": false,
"combat": false,
"leader": true,
"debuffs": [],
"name": "Jerirath",
"position": "standing",
"buffs": ["armor", "bless", "bless"],
"level": 4,
"xp": {
"max": 42550,
"cur": 3944
},
"stats": {
"Mana": {
"max": 91,
"cur": 91
},
"HP": {
"max": 73,
"cur": 73
},
"Move": {
"max": 230,
"cur": 230
}
}
},
{
"me": true,
"combat": false,
"follow": "Jerirath",
"leader": false,
"debuffs": [],
"name": "Nick",
"position": "standing",
"buffs": ["bless", "bless", "armor"],
"level": 4,
"xp": {
"max": 42550,
"cur": 489
},
"stats": {
"Mana": {
"max": 94,
"cur": 94
},
"HP": {
"max": 72,
"cur": 67
},
"Move": {
"max": 230,
"cur": 230
}
}
}
]
See the JSON website [2] for more on JSON, as well as a comprehensive list of JSON implementations categorized by language. It's rather easier to grab one of those than somehow shoehorn Lua into, say, Visual Basic. And some languages, like Python, include JSON routines out of the box.
EDIT: fixed grammar and flow because I'm a grammar-and-flow fiend.
[1] jsonlint.com
[2] json.org |