Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Lua Json
Commits
f17039c8
Commit
f17039c8
authored
May 11, 2019
by
seny
Browse files
Fix docs
parent
f515814f
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
f17039c8
...
...
@@ -133,7 +133,7 @@ local json = require 'json'
local function filter(t)
for k, v in pairs(t) do
if
type(v) == 'number' and (
v ~= v or v == 1/0 or v == -1/0
)
then
if v ~= v or v == 1/0 or v == -1/0 then
error(("invalid value '%f' at index '%s'"):format(v, k))
end
end
...
...
@@ -151,6 +151,7 @@ local function check(t)
end
local t = {
str = 'abc',
val = 1.234,
nan = 0/0,
inf = 1/0,
...
...
@@ -158,6 +159,7 @@ local t = {
}
local s = [[{
"str": "abc",
"val": 1.234,
"nan": nan,
"inf": inf,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment