fastJson Lib 1.1.0 Released

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bhall2001
Posts: 107
Joined: Thu Oct 30, 2014 3:54 pm
Location: Manchester, NH

fastJson Lib 1.1.0 Released

Post by bhall2001 » Tue May 17, 2016 10:05 pm

I'm happy to announce that version 1.1.0 of the fastJSON library is now available. This version cleans up some of the commenting that I had in the code, plus adds in some nice improvements from "madpink" and "mwieder". You will also see the library is now LC8 friendly as a script only stack. I have also updated my silly little test stack to include the LC8 lib as part of it's testing.

My non-scientific tests show that fastJson is significantly faster encoding/decoding JSON data compared to the LC8 LCB library.

fastJson is completely open source and on github at https://github.com/bhall2001/fastjson. If you're working with REST APIs or JSON data give it a try.

Bob

Benchmarks
in milliseconds on 3.5GHz iMac late 2014

Test 1: basicArray.json (136KB), basic JSON array file with 26,001 tokens
LC 7.1.4 fastJson Lib (as a reference)
JSON To Array - 441
Array To JSON - 64

LC 8.0.0 fastJson
JSON To Array - 457
Array To JSON - 64

LC 8.0.0 built in library
JSON To Array - 780
Array To JSON - 237

------------------------
Test 2: lcdict.json (4.9MB), a complex JSON file with the Livecode Dictionary circa 2015 with 405,707 tokens
LC 7.1.4 fastJson Lib (as a reference)
JSON To Array - 7860
Array To JSON - 4240

LC 8.0.0 fastJson
JSON To Array - 7913
Array To JSON - 2658

LC 8.0.0 built in library
JSON To Array - 23731
Array To JSON - 3110

livecodeali
Livecode Staff Member
Livecode Staff Member
Posts: 192
Joined: Thu Apr 18, 2013 2:48 pm

Re: fastJson Lib 1.1.0 Released

Post by livecodeali » Wed May 18, 2016 5:56 pm

Hi Bob!

Are you able to attribute the significant speed boost in the LC 8 Array To JSON with the complex JSON file to any changes that have been made to fastJson? Or is it a result of engine improvements in LC 8?

Cheers,
Ali

Post Reply

Return to “Talking LiveCode”