-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CJSON decode limited to 250 characters #1494
Comments
This doesn't seem to be a limitation of the The following code works: jstr = '"aa":"1","bb":"2","cc":"3","dd":"4","ee":"5","ff":"6","gg":"7","hh":"8","ii":"9","jj":"10","kk":"11","ll":"12","mm":"13","nn":"14","oo":"15","pp":"16","qq":"17","rr":"18","ss":"19","tt":"20","uu":"21","vv":"22","w":"23","x":"24","y":"25","z":"26"'
jstr = '{'..jstr..',"xyz":"1231231231231"}'
print(string.len(jstr) .. '\n') -- 270
for k,v in pairs(cjson.decode(jstr)) do print(k,v) end |
Not a NodeMCU issue then. Thanks. |
Well, I think it sorta is, in the sense that the If you run Lua on a computer, it doesn't have this limitation. Well, at least not |
A json string with 250 characters or less decodes correctly, but if the string of json data is 251 characters or more in length then an error is raised: LUA interpreter error detected!
The following code works:
The following code generates an error (one additional "w" character):
I also tested a json string that contained a single key/value pair. If the combined length of the key/value pair exceeds 250 characters the same error is raised.
I am using the following:
Is the 250 character limit a feature or a bug? I couldn't find any documentation which mentions a limit on the size of the json input string.
The text was updated successfully, but these errors were encountered: