Comparison

util/jsonschema.lua @ 12759:ec54fe0003d5 0.12

util.jsonschema: Fix Lua 5.2 integer compat math.type() is unavailable before Lua 5.3 so this should use the compat function added at the top
author Kim Alvefur <zash@zash.se>
date Sun, 09 Oct 2022 15:38:36 +0200
parent 12579:ca6a43fe0231
child 12760:ce1a0f9bf25a
comparison
equal deleted inserted replaced
12758:7929c0ffbe14 12759:ec54fe0003d5
79 79
80 if schema.type == "array" then 80 if schema.type == "array" then
81 if type(data) == "table" then 81 if type(data) == "table" then
82 82
83 for i in pairs(data) do 83 for i in pairs(data) do
84 if not (math.type(i) == "integer") then 84 if not (m_type(i) == "integer") then
85 return false 85 return false
86 end 86 end
87 end 87 end
88 end 88 end
89 end 89 end