arrayencode

Martin Koob mkoob at rogers.com
Thu Jun 23 12:08:20 EDT 2022


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 inclusions when saving the standalone application’
The app would not work properly when those commands were called.

The work around is in the Inclusions tab  choose 'Select inclusions for the standalone application'
And then manually select the inclusion for mergJSON 

I reported the bug but it was marked a duplicate.  I describe my workaround there. 
https://quality.livecode.com/show_bug.cgi?id=23736
I also have a demo stack showing the problem there.

Also check if you have a 32 or 64 bit version of mergJSON.  I have had mergJSON installed for a long time and while I was trying to trouble shoot this issue I found I had a few copies of mergJSON in the My LiveCode folder in different locations.  I found one was created in 2013 which I think was 32 bit so I removed that and replaced it with one in another location created in 2019. 


Martin


> On Jun 23, 2022, at 8:23 AM, Alex Tweedly via use-livecode <use-livecode at lists.runrev.com> 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:
>> 
> Thanks Ralf. I did see that code in the dictionary - but it also says that those functions are provided in thews.goulding.script-library.mergjson library, so (I think) I shouldn't need to put them in myself.
> 
> In fact, I did try it anyway - but that simply changes the error to "handler not found: mergJSONDecode"
> 
>> Another option would be to load the JSON extension and to use
>> the JsonImport() function.
>> 
> Didn't know about jsonImport; it's not mentioned in the dictionary, but I now see it shows up in a few lessons, etc.
> 
> However,I think the real problem for me is "... to load the JSON extension ...". I wasn't aware I had to load those extensions which are already part of the standard package (maybe I did that years ago and have had time to forget :-).
> 
> I can't find anything about loading extensions other than what to do in the IDE.
> 
> How do you load extensions to LC Server ?  On a shared web provider ?  (on-rev)
> 
> Thanks,
> Alex
> 
>> 
>> Ralf
>> 
>> 
>> 
>> On 23.06.22 01:31, Alex Tweedly via use-livecode 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 Livecode's support for JSON is, hmmm, mediocre at best ??
>>> 
>>> The parser "built-in" seems to work fine in the IDE, but not on the server :
>>> 
>>>> <?lc
>>>> set the errormode to inline
>>>> put the version
>>>> 
>>>> put "{'name':'asdf'}" into t
>>>> replace "'" with quote in t
>>>> put JSONtoarray(t) into tA
>>>> put the keys of tA
>>>> 
>>> fails with -
>>> 
>>> file "/home/alextwee/public_html/rampuk/tJSON.lc"
>>> row 7, col 5: Function: error in function handler (JSONtoarray)
>>> row 7, col 5: put: error in expression
>>> 
>>> (there's no mention of any platform restricitons in the dictionary).
>>> 
>>> I tried copying in the sample ode for wrapping JSONToArray around mergJSONDecode,
>>> which then fails with "error in function handler mergJSONDecode.
>>> 
>>> 
>>> (I must admit I encountered this a while ago, figured it was probably a temporary issue
>>> so I replaced JSON by LSON, and forgot all about it.) This discussion prompted me to re-try it.
>>> 
>>> I can't believe this problem isn't causing widespread problems, so it's probably
>>> something specific about me, or my on-rev account. If anyone has suggestions, I'll
>>> try them; if not, I'll put it as a bug report into QCC see what happens.
>>> 
>>> Alex.
>> 
>> 
>> 
>> _______________________________________________
>> 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
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com <mailto: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 <http://lists.runrev.com/mailman/listinfo/use-livecode>


More information about the use-livecode mailing list