2 ms·
Have you considered Lua tables? The syntax resembles JSON, but simpler, and keys don't need to be quoted. Trailing commas are allowed, and so are multiline str
by krapp 8y ago
Have you considered Lua tables?
The syntax resembles JSON, but simpler, and keys don't need to be quoted. Trailing commas are allowed, and so are multiline strings.
- ngrilly 8y agoI didn't have. But how do you parse it without Lua? Is a parser library available for mainstream languages?
- krapp 8y ago> But how do you parse it without Lua? You wouldn't, but the language is lightweight enough (according to Wikipedia, the interpreter is ~180kb compiled) that including it as a dependency probably won't matter. It's less overhead than an interpreter for JSON or YAML at least. >Is a parser library available for mainstream languages? It's used commonly in game development so yes for C and C++, and the site[0] mentions "Java, C#, Smalltalk, Fortran, Ada, Erlang, and even in other scripting languages, such as Perl and Ruby" as well. [0]https://www.lua.org/about.html https://www.lua.org/about.html