lljson.slencode()
uses the same metamethods and metatables than
lljson.encode()
:
  • __tojson
  • __len
  • array_mt
  • empty_array_mt
Since the purpose of
lljson.slencode()/sldecode()
is to decode the same table that was encoded, the options to change the encoding are not useful.
Not using them would allow to:
  • export the table to an external resource, using the metamethods and metatables to configure it.
  • store the same table internally as it is, without using the metamethods and metatables.
And it would avoid conflicts with:
  • a __len metamethod used for something else (like getting the length of a dictionary table).