Anybody written a JSON Parser?

More advanced topics discussed.

Moderators: Susan Smith, admin, Gabriel

bluesfannoz
Posts: 292
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Re: Anybody written a JSON Parser?

Post by bluesfannoz »

Any and all examples you have would be helpful! Especially POST operations of JSON data.
Steve Koger
Computer Specialist
SEKESC-MACS Division
bluesfannoz
Posts: 292
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Re: Anybody written a JSON Parser?

Post by bluesfannoz »

Just checking if you had a chance to throw together some examples?
Steve Koger
Computer Specialist
SEKESC-MACS Division
Mikhail
Posts: 87
Joined: Tue Jul 07, 2009 10:26 am
Location: Ukraine

Re: Anybody written a JSON Parser?

Post 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.
Mikhail
Posts: 87
Joined: Tue Jul 07, 2009 10:26 am
Location: Ukraine

Re: Anybody written a JSON Parser?

Post 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
bluesfannoz
Posts: 292
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Re: Anybody written a JSON Parser?

Post 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.
Steve Koger
Computer Specialist
SEKESC-MACS Division
Mikhail
Posts: 87
Joined: Tue Jul 07, 2009 10:26 am
Location: Ukraine

Re: Anybody written a JSON Parser?

Post 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
bluesfannoz
Posts: 292
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Re: Anybody written a JSON Parser?

Post by bluesfannoz »

Thanks! Just what I needed. Although I have it uploading JSON to non-BR http server.
Steve Koger
Computer Specialist
SEKESC-MACS Division
Post Reply