arrayencode

Martin Koob mkoob at rogers.com
Tue Jun 21 23:31:19 EDT 2022


What is LSON?  A web search doesn’t turn up anything.  A shot in the dark here but Is it something internal to LiveCode i.e. Livecode Script Object Notation that is the basis for LiveCode arrays?

Thanks for the references on BSON


Martin

> On Jun 21, 2022, at 10:43 PM, Richard Gaskin via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> l oTom Glod wrote:
> 
> > I am wondering if anyone here knows the encoding algorithm
> > that arrayencode() uses?
> 
> Yes.
> 
> 
> > Is it one that can be implemented in another language or is
> > it proprietary?
> 
> It should be technically possible to implement any algo in any sufficiently-complete language.
> 
> Whether LC Ltd considers is proprietary in terms of limiting interoperability with other systems is something only they can address.
> 
> 
> I have notes on the v6.7-and-earlier format, and it shouldn't be hard to figure out the changes for v7-and-later.
> 
> But as much as I've enjoyed LSON for LC-to-LC data transfer, I wouldn't recommend it as a general-purpose serialization format. Though its binary nature makes it similar to BSON in some efficiency areas, the world uses JSON for interoperability, and these days that includes even LC.
> 
> If you have a use case that truly needs it and can't use industry-standard JSON, let me know and I can dig through my archives to find the notes I'd assembled years ago from some tips Mark Waddingham was generous enough to send.
> 
> But you'll want to consider this carefully. Format choices have a way of becoming technical debt with surprising ease over time.
> 
> For better or worse, the universal de facto standard for serialization today is JSON. LC itself is committed to JSON for interoperability, even bringing in parts of the ECMAScript parser. JSON is well documented, with tons of tooling. And in some ways JSON is a superset of LC's associative arrays, so it offers options for expressiveness beyond LSON.
> 
> I've had some good times with LSON. But the moment I think of any part of the system not made with LC, I think about other formats.
> 
> If I needed the efficiency of a binary format, for interoperable work I'd consider BSON. Its only drawback is the same as LC's: it's currently used by only one tool ;) (MongoDB, though in all fairness it's presented as an open standard and may have a few other adopters as well).
> 
> https://bsonspec.org/
> 
> BSON parsers are available for a great many languages:
> https://bsonspec.org/implementations.html
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list