Does the openresty installation have any json validator for lua? the cjson.decode just blows up and the cjson library does not seem to have a validation method for json?Do i have to use some other open source libs written for Lua for JSON validation?
--
You received this message because you are subscribed to the Google Groups "openresty-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openresty-en...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
That was exactly what I needed. Thanks so much. :)
You received this message because you are subscribed to a topic in the Google Groups "openresty-en" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openresty-en/zcZJySqb8UY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openresty-en...@googlegroups.com.
That was exactly what I needed. Thanks so much. :)
On 22-Sep-2014 8:28 pm, "James Hurst" <ja...@pintsized.co.uk> wrote:
Hi,cjson.decode will give you some hints in an error string if you call using pcall. If you just want to ensure it doesn't blow up at run time, pcall is definitely all you need: http://www.lua.org/manual/5.1/manual.html#pdf-pcalllocal ok, res = pcall(cjson.decode, json)'ok' will either be true of false, and 'res' will either be the return value or an error string.James.
On 22 September 2014 15:27, Samarjit Uppal <uppal...@gmail.com> wrote:
Does the openresty installation have any json validator for lua? the cjson.decode just blows up and the cjson library does not seem to have a validation method for json?Do i have to use some other open source libs written for Lua for JSON validation?
--
You received this message because you are subscribed to the Google Groups "openresty-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openre...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "openresty-en" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openresty-en/zcZJySqb8UY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openre...@googlegroups.com.