LC8 - Stumbling into JSON
livfoss at mac.com
Tue Jun 14 15:37:25 EDT 2016
More thanks is due, to Devin and to Richard. Some of the fog of my ignorance is dispersing, I hope and believe.
> On 14 Jun 2016, at 21:09, Devin Asay <devin_asay at byu.edu> wrote:
>> On Jun 14, 2016, at 9:52 AM, Richard Gaskin <ambassador at FourthWorld.com> wrote:
>>> As you’ll see it’s a whole new world of functionality, and so simple
>>> to access through LiveCode, using GET and POST requests.
>> ...and with LC Server also easy to provide.
> That’s the rest of the story. In most of my projects I am both the creator and consumer of the API. All in LiveCode.
>> When designing a REST API I've found Vinay Sahni's "Best Practices for Designing a Pragmatic RESTful API" the best one-stop-shopping for good, clear ideas:
>> Andre Garzia's revSpark library helps with implementing good REST APIs:
>> Extra bonus points: if both your client and server are written in LiveCode, you can bypass JSON and use LSON instead, LiveCode's own native array serialization provided by arrayEncode and arrayDecode. These binary data streams can even be compressed with LC's built-in compress function for faster transport.
>> In fact, if you have an API that may sometimes deliver to LC-based clients and sometimes to Web clients, you can take a tip from Vinay's article and have JSON as the default but allow the requesting URL to end with ".json" to specify JSON as the delivery format.
> Thanks for the great links, Richard! Bookmarked.
> Devin Asay
> Office of Digital Humanities
> Brigham Young University
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode