[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [ANN] luajson 1.2.4
- From: Marc Balmer <marc@...>
- Date: Mon, 15 Feb 2016 11:57:01 +0100
I released version 1.2.4 of a JSON module. This version addresses a small but important detail when using Lua 5.3:
When a JSON number is decoded, it checks if the number contains a decimal dot. If that is the case, a floating point number will be pushed on the Lua stack, if no dot is contained, an integer is pushed.
Find it at https://github.com/arcapos/luajson/
To illustrate the issue:
-- Before the fix:
Lua 5.3.2 Copyright (C) 1994-2015 Lua.org, PUC-Rio
> json = require 'json'
> = json.decode('42')
42.0
> return json.decode('42.1')
42.1
>
-- After the fix
Lua 5.3.2 Copyright (C) 1994-2015 Lua.org, PUC-Rio
> json = require 'json'
> = json.decode('42')
42
> return json.decode('42.0')
42.0