[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: dealing with null (not nil)
- From: Henk Boom <henk@...>
- Date: Wed, 27 Jul 2011 20:52:55 -0400
On 27 July 2011 11:17, Dave Collins
<Dave.Collins@mercatustechnologies.com> wrote:
> Or maybe I should make a mod to my json parser (dkjson) to have to autoconvert null to "".
I have not used dkjson, but a quick glance at the documentation
suggests that you could do
json.decode(str, 1, json.null)
followed by manual checks for null (i.e. value == json.null), or even
straight-up
json.decode(str, 1, "")