jdesgats / ljsonschema Goto Github PK
View Code? Open in Web Editor NEWPure Lua JSON schema validator
License: MIT License
Pure Lua JSON schema validator
License: MIT License
Hi, any help with this? Thanks ;-)
lua: /usr/local/share/lua/5.1/jsonschema/init.lua:188: [string "jsonschema:anonymous"]:3686: main function has more than 200 local variables
stack traceback:
[C]: in function 'error'
/usr/local/share/lua/5.1/jsonschema/init.lua:188: in function </usr/local/share/lua/5.1/jsonschema/init.lua:168>
(tail call): ?
.///compiled/abstract/minetest_mod/generator.lua:995: in main chunk
[C]: in function 'require'
./check.lua:2: in main chunk
[C]: ?
adding this as an issue because I could not find another way to reach out.
-- Note: do cache the result of schema compilation as this is a quite
-- expensive process
I read the above in the examples given, but I am not able to figure out what to cache exactly. can you please share an example of caching the compiled schema
In case there are more than 2 errors in the document, how can we get the complete list? The ljsonschema currently returns only 1 error.
Hi, ljsonschma doesn't work expected when I try the regular expressions: regular expressions.
The error message is: property "OpenKey" validation failed: failed to match pattern "^(\([0-9]{3}\))?[0-9]{3}-[0-9]{4}$" with "555-1212"
I installed this library and run the example code in readme, but get faild.
lua: /usr/local/share/lua/5.1/jsonschema/init.lua:161: bad argument #1 to 'load' (function expected, got string)
stack traceback:
[C]: in function 'load'
/usr/local/share/lua/5.1/jsonschema/init.lua:161: in function </usr/local/share/lua/5.1/jsonschema/init.lua:160>
(tail call): ?
a.lua:5: in main chunk
[C]: ?
I also find some differences between the actual code I installed and github.
For example, local coro_yield = coroutine.yield
is not on luarocks version.
But it's in github source code.
I got this error message
property "private_token" validation failed: failed to match pattern "[a-fA-F0-9]{32}" with "6DA43D15DA6DC5BFD9D347EBAAAB72A9"
But I test on https://regex101.com/ actually it's passed.
Is this a bug? or I'm using the wrong way?
Has this package been published as stated in the README ?
Running example in LUA 5.1 is good.
But when i'm trying to run example in OpenResty (with LuaJIT), it rises an error:
ERROR: attempt to yield across C-call boundary
stack traceback:
coroutine.wrap:21: in function coroutine.wrap:21
[C]: in function 'load'
./jsonschema/init.lua:169: in function 'generate_validator'
test.lua:5: in function 'file_gen'
init_worker_by_lua:45: in function <init_worker_by_lua:43>
[C]: in function 'xpcall'
init_worker_by_lua:52: in function <init_worker_by_lua:50>
Currently, error message are rather primitive and untested...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.