Page 1 of 1

json in LUA?

Posted: Thursday 17 June 2021 14:26
by manjh
I have a question that is embarrassingly simple, I think I should be able to figure this out by myself, but can't...

What I want to do is issue a json command from a LUA script. I have found the elaborate description in the Wiki, but cannot figure out how to issue such a command in a LUA script.
Can someone point me in the right direction?

Re: json in LUA?

Posted: Thursday 17 June 2021 14:45
by erem

Re: json in LUA?

Posted: Thursday 17 June 2021 18:30
by manjh
erem wrote: Thursday 17 June 2021 14:45 this thread may have what you need
viewtopic.php?f=59&t=36489&p=276325&hilit=http#p276325
That's dzvents, I'd like to merge into a pure LUA script...

Re: json in LUA?

Posted: Friday 18 June 2021 15:10
by erem

Re: json in LUA?

Posted: Saturday 19 June 2021 17:12
by manjh
erem wrote: Friday 18 June 2021 15:10 does this fit the bil?

https://github.com/daurnimator/lua-http
Not sure, but I did discover that the install process is more than I expected.
Had to install Luarocks first in order to be able to install http.
Then installed http, but ran into errors: need to install crypto first. Not sure if I want to do this... it seems more than it is worth.

Re: json in LUA?

Posted: Saturday 19 June 2021 19:18
by erem
since it supports https as well, crypto is a mandatory install.
you may be be to uninstall it after if you only use http.

ymmv.