Re: ArrayToJSON in LCServer ?

2017-11-26 Thread Alex Tweedly via use-livecode
The mergJSON external is already included in LCServer - mergJSONEncode 
and mergJSONDecode work fine; it's just the convenience functions 
(arrayToJSON and JSONToArray) which are missing. They are very short, 
and can be found in the dictionary entries for those main functions, and 
then simply copied/pasted into your own script or library.


-- Alex.

On 25/11/2017 15:13, pink via use-livecode wrote:

ArrayToJSON is from the mergJSON external... so in order for you to use it,
you would need to be able to access the external through your server
installation. I don't know if that is possible...

My recommendation would be to use a library such as fastJSON. I use fastJSON
with LC Server all the time without issue.



-
---
Greg (pink) Miller
mad, pink and dangerous to code
--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: ArrayToJSON in LCServer ?

2017-11-25 Thread pink via use-livecode
ArrayToJSON is from the mergJSON external... so in order for you to use it,
you would need to be able to access the external through your server
installation. I don't know if that is possible...

My recommendation would be to use a library such as fastJSON. I use fastJSON
with LC Server all the time without issue.



-
---
Greg (pink) Miller
mad, pink and dangerous to code
--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: ArrayToJSON in LCServer ?

2017-11-17 Thread Devin Asay via use-livecode
Alex,

My recollection is that for functions in libraries, like this one, you have to 
find the library stack in the IDE installation and copy it to your server then 
‘start using’ it, in the case of a stack, or ‘include’ it in the case of a .lc 
script. (The former is what I’ve done, I believe.) I’ve done this successfully. 
The hard part is figuring out where the library is stashed in the IDE 
installation.

HTH

Devin

On Nov 17, 2017, at 3:57 PM, Alex Tweedly via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

It looks as though arrayToJSON() isn't included in LCServer  (*).

That can't be right - can it ?

Must be something I need to do - but what ?


(*) The dictionary for the array <-> JSON functions don't mention OS or 
Platforms.

My simple test script could be much simpler ...

http://tweedly.co.uk/tryme.lc>"
  row 6, col 5: Function: error in function handler (arraytojson)
  row 6, col 5: put: error in expression

-- Alex.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Devin Asay
Director
Office of Digital Humanities
Brigham Young University

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

ArrayToJSON in LCServer ?

2017-11-17 Thread Alex Tweedly via use-livecode

It looks as though arrayToJSON() isn't included in LCServer  (*).

That can't be right - can it ?

Must be something I need to do - but what ?


(*) The dictionary for the array <-> JSON functions don't mention OS or 
Platforms.


My simple test script could be much simpler ...


file "/home/ua886128/public_html/tweedly.co.uk/tryme.lc"
   row 6, col 5: Function: error in function handler (arraytojson)
   row 6, col 5: put: error in expression


-- Alex.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode