lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2017-04-14 22:42 GMT+02:00 Sean Conner <sean@conman.org>:
> It was thus said that the Great Dirk Laurie once stated:
>> I used to like lua-cjson but it does not sit well with Lua 5.3.
>> Whenever a string could represent a number, it converts
>> it to a float, so that every integer prints with a .0 at the end.
>>
>> Any recommendations for a module that works under Lua 5.3
>> and does not have this annoying feature?
>
>   Are you asking for a JSON module, or anything that can
> serialize/deserialize data between two spots, say like CBOR? [1][2]
>
>   Another question:  what should the result be of:
>
>         { "count" : 9223372036854775808 }
>
>   -spc (It's an integer ... )

In my application,

(a) I actually only need decoding into a Lua table
(b) integers will be within signed 32-bit range but I don't want floats for
them, so I'm not answering your trick question.