As usual, when some problem emerges, I realise that I may have not chosen the best solution, or that OS/LC version updates have surpassed me, leaving me with wrong solutions.
In this case, my problem is how to do "json to array" and "array to json" conversion between my standalone and the data sent and returned by my FileMaker Server and by Microsoft Azure.
The data exchanged are multidimensional array, that may contain numbers, text, image data and so on.
As of now, in the inclusion of the standalone, I have the "JSON library". But I also use a substack as library with the " FASTJSON v1.1.1" by Bob Hall.
I have to use the JSON library (jsonImport) for converting Json to array
Code: Select all
put textDecode(pJSON,"UTF8") into tJSON
put JsonImport(tJSON) into tArray --JSON library in inclusion
Code: Select all
put ArrayToJSON(pArray) into tArrayJson --convert to json in fastjson library
put textEncode(tArrayJson, "utf-8") into tArrayJson
"jsonImport" got VERY slow dealing with a 150k image data in the content of the array, and sometime things go wrong.
And then there is mergJSON, with I never dealt with, but may be I should?
So, the point is: is there a unique solution for dealing with JSON in LC, fast and reliable for any situation, or this is a wishful thinking and I need to always patch things here and there?
Sorry if my post demonstrates naivety.
Thanks