Page 2 of 2

Re: Anybody written a JSON Parser?

Posted: Sat Dec 17, 2016 10:50 pm
by bluesfannoz
Any and all examples you have would be helpful! Especially POST operations of JSON data.

Re: Anybody written a JSON Parser?

Posted: Wed Jan 11, 2017 9:28 pm
by bluesfannoz
Just checking if you had a chance to throw together some examples?

Re: Anybody written a JSON Parser?

Posted: Fri Jan 13, 2017 7:06 pm
by Mikhail
I haven't had any time, very busy week, but I finally dug up BR 4.2 release notes where some HTTP client documentation lives.
Coincidentally, I need to write a BR program that involves HTTP client using GET and POST to talk to a web server. So I will try to post an example asap.

Re: Anybody written a JSON Parser?

Posted: Sat Jan 14, 2017 5:22 pm
by Mikhail
I made an example of a BR http client sending a request to BR http server, which runs in another BR session. BR forum won't let me upload the ZIP file containing the example though. So I can upload it elsewhere or email it to those who need it

Re: Anybody written a JSON Parser?

Posted: Sat Jan 14, 2017 6:35 pm
by bluesfannoz
You can rename the file from a .zip extension to a .txt and then it will allow you to upload. Then anyone who downloads needs to rename the file back to a .zip extension.


Meanwhile you can send it to steve.koger@greenbush.org.

Re: Anybody written a JSON Parser?

Posted: Sun Jan 15, 2017 8:29 am
by Mikhail
The problem is that the file is too big.
Here is a link where you can download the example that works on BR 4.31hg:

https://drive.google.com/file/d/0BzAKV2 ... sp=sharing

Instructions:
1) unzip
2) copy your brserial.dat into httpclient folder
3) load BR.exe and run web_server.bro
Windows may ask you to allow BR through the firewall
4) load a second session of BR.exe and run httpclient.br
5) watch as data gets sent from httpclient to web_server, then processed and sent back to the client

Re: Anybody written a JSON Parser?

Posted: Wed Jan 25, 2017 1:09 pm
by bluesfannoz
Thanks! Just what I needed. Although I have it uploading JSON to non-BR http server.