[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luajson vs. null
- From: Alexander Gladysh <agladysh@...>
- Date: Sat, 11 Sep 2010 21:26:35 +0400
On Sat, Sep 11, 2010 at 18:19, Thomas Harning Jr. <harningt@gmail.com> wrote:
> On 9/11/10, Alexander Gladysh <agladysh@gmail.com> wrote:
>> However, there is a problem with nulls inside JSON data. The
>> json.decode() inserts json.util.null() there, but, to get serializable
>> output, I need Lua nils.
> If you pass in the json.decode.simple config table to decode, you will
> get actual nils for null and undefined.
> json.decode("null", json.decode.simple)
> json.decode.getDecoder(json.decode.simple)("null")
Thanks! This does work!
Any reason why it is not documented?
Alexander.