Websockets and JSON format
Posted: Thu Dec 17, 2015 7:18 am
Ok my subject title sounds like I know what I'm talking about but truthfully I don't have a clue about networking or parsing streams of data. I'm sort of an advanced livecode beginner with a few apps under my belt but thought I'd stretch myself with a new hobby project. I'm pretty clear about building the front end of the App but the backend stuff is scary so I'm looking for a bit of guidance....
Here's the concept: IOS App (client) that subscribes to JSON formatted data (from local server) and updates the screen with values that change approximately once per second. Will be read only for now.
Here's the data subscription protocol: http://signalk.org/developers/subscript ... tocol.html
My understanding is that 7.1.1 of livecode now supports web sockets for mobile so that's my starting point.
I guess what I need to figure out is:
1) Is JSON possible with livecode?
2) How to open the connection to the server?
3) How to subscribe to the data values I want?
4) How to parse out those values and then update the screen with those values?
For the first phase I won't store any data, just use it and lose it.
Bonus points if you know how to code Bonjour discovery!
I found this lesson http://lessons.livecode.com/m/4071/l/12 ... ng-sockets but the whole JSON thing confuses me.
Thanks in advance if you can help, Adam
Here's the concept: IOS App (client) that subscribes to JSON formatted data (from local server) and updates the screen with values that change approximately once per second. Will be read only for now.
Here's the data subscription protocol: http://signalk.org/developers/subscript ... tocol.html
My understanding is that 7.1.1 of livecode now supports web sockets for mobile so that's my starting point.
I guess what I need to figure out is:
1) Is JSON possible with livecode?
2) How to open the connection to the server?
3) How to subscribe to the data values I want?
4) How to parse out those values and then update the screen with those values?
For the first phase I won't store any data, just use it and lose it.
Bonus points if you know how to code Bonjour discovery!

I found this lesson http://lessons.livecode.com/m/4071/l/12 ... ng-sockets but the whole JSON thing confuses me.
Thanks in advance if you can help, Adam