in my app i got the following error when enconding to json:
Cannot serialise table: excessively sparse array
i want json to ignore this and generate the json file anyway, is that possible?
(or at least to catch this error within the app. i never did that, can you tell me how to do that?)
thanks
Comments
Otherwise you can catch errors with pcall() lua function.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
are these correct in the linked file?
-- "convert" must be a boolean. Default: false.
-- "ratio" must be a positive integer. Default: 2.
-- "safe" must be a positive integer. Default: 10.
in reality the optimal would be to be able to set these constants (in particular set ratio to 0 ) when running the json encoder, like
json.encode(convert,ratio,safe)
or
json.encode_sparse_array(true)
or something similar
Fragmenter - animated loop machine and IKONOMIKON - the memory game
that's cool, then it's a matter of documentation to make us know about it, as here there should be at least a link to the details:
http://docs.giderosmobile.com/reference/plugin/json#json
thanks for letting me know.
Fragmenter - animated loop machine and IKONOMIKON - the memory game