Re: arrayencode

2022-06-23 Thread Alex Tweedly via use-livecode
On 23/06/2022 17:48, Ralf Bitter via use-livecode wrote: Hi Alex, have you added the mergJSON External to your server installation? No. In fact, I didn't realize I needed to, or even could :-) You guessed it, use "load extension", example (tested on on-rev): load extension from file "/home

Re: arrayencode

2022-06-23 Thread Ralf Bitter via use-livecode
On 23.06.22 14:23, Alex Tweedly via use-livecode wrote: On 23/06/2022 10:31, Ralf Bitter via use-livecode wrote: Hi Alex, the JSONtoArray() function is part of the mergJSON external. The README of this external describes how to use this function and it's counterpart JSONtoArray as follows:

Re: arrayencode

2022-06-23 Thread Martin Koob via use-livecode
Hi There is a confirmed bug in bugzilla regarding loading of the mergJSON library. https://quality.livecode.com/show_bug.cgi?id=21223 I ran into it when building a standalone. I didn’t cause a problem in the IDE. In the standalone settings ‘Inclusions’ tab if I chose 'Search for required incl

Re: arrayencode

2022-06-23 Thread Alex Tweedly via use-livecode
On 23/06/2022 10:31, Ralf Bitter via use-livecode wrote: Hi Alex, the JSONtoArray() function is part of the mergJSON external. The README of this external describes how to use this function and it's counterpart JSONtoArray as follows: Thanks Ralf. I did see that code in the dictionary - but it

Re: arrayencode

2022-06-23 Thread Ralf Bitter via use-livecode
Hi Alex, the JSONtoArray() function is part of the mergJSON external. The README of this external describes how to use this function and it's counterpart JSONtoArray as follows: This external has been implemented to encode/decode UTF8 JSON to a LiveCode array as quickly as possible. Currently

Re: arrayencode

2022-06-22 Thread Richard Gaskin via use-livecode
Alex Tweedly wrote: > Nevertheless, my central point remains (afact) valid - the support > for JSON in Livecode seems incomplete, and in particular it seems > flaky/missing on LCServer. Making externals easily findable by the LC Server engine should be a quick fix for them, no? -- Richard Ga

Re: arrayencode

2022-06-22 Thread Alex Tweedly via use-livecode
On 23/06/2022 00:38, Richard Gaskin via use-livecode wrote: Interesting take. Thanks. I'd read Tom's post as being about LSON, with LC in both producer and consumer roles, which would make a JavaScript-optimized format unnecessary.  Perhaps I'd misunderstood. No, you didn't misunderstand. I

Re: arrayencode

2022-06-22 Thread Richard Gaskin via use-livecode
Alex Tweedly wrote: > On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: >> [ ... about using JSON ... ] >> But if you don't need interoperability, you wouldn't need to write a >> parser, since LC includes a good one built into the engine. >> >> What did I miss? > > The fact that Livecod

Re: arrayencode

2022-06-22 Thread Alex Tweedly via use-livecode
On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote: [ ... about using JSON ... ] But if you don't need interoperability, you wouldn't need to write a parser, since LC includes a good one built into the engine. What did I miss? The fact that Livecode's support for JSON is, hmmm, med

Re: arrayencode

2022-06-22 Thread Bob Sneidar via use-livecode
Okay I looked up JSON and can see these are two different animals. JSON looks like an xml-ish sort of format or a bit like the PDF fdf format for data files. (In fact, now that I think about it Adobe may be using JSON as their format. Bob S > On Jun 22, 2022, at 09:13 , Richard Gaskin via use

Re: arrayencode

2022-06-22 Thread Richard Gaskin via use-livecode
Bob Sneidar wrote: > Richard I think I hear you say that JSON is an alternative to > arrayEncode? I'm apparently writing so badly maybe I should skip the shorthand "LSON" and just write the full form: "output from LC's built-in arrayEncode". I'd adopted "LSON" to help position its role as the

Re: arrayencode

2022-06-22 Thread Richard Gaskin via use-livecode
Tom Glod wrote: > Hello Richard, thanks for the detailed answer. > There are 2 reasons why I am considering this. > > 1. I can skip the encoding and decoding from and to json. > 2. it supports binary, and does not require base encoding and its > 33% inflation. > > For interoperability for the use

Re: arrayencode

2022-06-22 Thread Bob Sneidar via use-livecode
Richard I think I hear you say that JSON is an alternative to arrayEncode? What about storing to SQL blob and binary files? Will it suffice? I'd consider converting all my arrayEncoding to JSON if so. Bob S > On Jun 21, 2022, at 19:43 , Richard Gaskin via use-livecode > wrote: > > For bett

Re: arrayencode

2022-06-22 Thread Tom Glod via use-livecode
Hello Richard, thanks for the detailed answer. There are 2 reasons why I am considering this. 1. I can skip the encoding and decoding from and to json. 2. it supports binary, and does not require base encoding and its 33% inflation. For interoperability for the users, JSON is the way to go for su

Re: arrayencode

2022-06-22 Thread Richard Gaskin via use-livecode
Martin Koob wrote: > Hi Richard > > Thanks for the explanation. I think it is a helpful term or > distinction to have. I think it would be good to actually have > that term with a formal definition published by LiveCode or > the community with references to BSON so it will show up in > web sea

Re: arrayencode

2022-06-22 Thread Martin Koob via use-livecode
Hi Richard Thanks for the explanation. I think it is a helpful term or distinction to have. I think it would be good to actually have that term with a formal definition published by LiveCode or the community with references to BSON so it will show up in web searches for either term to lead p

Re: arrayencode

2022-06-21 Thread Richard Gaskin via use-livecode
Martin Koob wrote: > 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? Sorry, Martin. I need to get out more. I've been using LSON ("LiveCode

Re: arrayencode

2022-06-21 Thread Martin Koob via use-livecode
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-l

Re: arrayencode

2022-06-21 Thread Richard Gaskin via use-livecode
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. Whe

Re: ArrayEncode/Decode broken??

2022-03-19 Thread J. Landman Gay via use-livecode
On 3/19/22 3:27 PM, Bob Sneidar via use-livecode wrote: I’m so embarrassed. I was too but I caught myself before I hit the Send button. We get so used to LC reading our minds we're surprised when it doesn't. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Softwar

Re: ArrayEncode/Decode broken??

2022-03-19 Thread Bob Sneidar via use-livecode
I’m so embarrassed. On my way to the beach this morning it hit me like a ton of bricks. DOH! Sent from my iPhone > On Mar 18, 2022, at 17:11, J. Landman Gay via use-livecode > wrote: > > I made the same mistake a while ago, until I remembered that the encoded > array is binary. You have to

Re: ArrayEncode/Decode broken??

2022-03-18 Thread J. Landman Gay via use-livecode
I made the same mistake a while ago, until I remembered that the encoded array is binary. You have to write and read it to/from a binary file. If you just use "open file" you get text only. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com