[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua interface standards
- From: Martin <eden_martin_fuhrspam@...>
- Date: Sun, 23 Apr 2017 09:55:39 -0700
On 04/22/2017 11:11 PM, Dirk Laurie wrote:
> When it comes to XML, it is no longer so obvious (does the attribute
> table go into [0] or a member named 'attr'? must the code/decode be
> deterministically reversible?), so the foundation or user association
> or benevolent dictator has some decisions to make.
Here we need good design. Does order of attribute key-values matters?
If no, we may map their names to table. If yes, we should use
sequence. (Personally I prefer "attr" subtable for element attributes
with key-values map.)
Also there will be need to standartize behavior for bad data both
when decoding and coding. For example you can't serialize table
with table-type keys to JSON. Or table with cycles. Should error()
be raised or just (nil, err_msg) returned?
Should standard provide .verify(t) function?
What if I want to serialize parts that can be serialized and omit
others? Should standard provide .align(t) function?
-- Martin