lua-users home
lua-l archive

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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/07/2013 19:44, Roberto Ierusalimschy wrote:
> 
> It should be clear that how to represent "null" in JSON is a
> problem quite different from how to represent "null" in Lua.
> 
That one is easy - NaN in Lua maps to null in JSON.  There is no
ambiguity there as you would get the same result from a NaN in
Javascript.  You just need to remember to check for it (because NaN is
truthy in Lua.)  nil still represents the absence of a key in the JSON
object as normal.

http://stackoverflow.com/q/1423081/12048
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJR1HxcAAoJEHp3pOlF38H/lbUH/AkfVexMpfY+KdkINowgaho0
oC68UrMErk9+kW/Q4SfNsGn0wABA+ycQjLNxIIYigbhXW3E9pV6sqFIVAz67lVxW
ZwUbmD8yC49QlKqOU2Y1zUeGi/kg9jhH2hLaXAYjnZtUYbXvj8MovmXntT1nTasz
5p6QeyCFLHv09T76bLXqpUjSJgriqa87ssX0LhZTO0D4noPBjO5eP31BeJYS2oZP
C6CT4KviDsCamRz8tvENHmYCH1QWluBuiubVTakVqGmAVvuiqomUgUJanQfYrn9j
GHQTCsXKrOoQ20gMOKOuJGPkxMlVi33mI7wsrTHd6Ou3MazvXt/OLg53ZELSTNA=
=5gun
-----END PGP SIGNATURE-----