Array editing or Validate JSON string?
waprothero at gmail.com
Sat Nov 17 18:39:47 EST 2018
I guess I could have been more clear. I am editing the JSON directly in a text field. If I make a mistake, then use JSONToArray, the program just fails silently. What I would like to do is get a dialog that the JSON wasn’t formed correctly. Of course, since I’m using it for my personal development of my app, I can know that it failed if I don’t get the answer dialog I put in after it. but, it seems a kludge. Shouldn’t there be some kind of an error result if the JSON is ill-formed?
> On Nov 16, 2018, at 1:57 PM, Mark Talluto via use-livecode <use-livecode at lists.runrev.com> wrote:
> Hi Bill,
> My favorite JSON validator is: https://jsonformatter.curiousconcept.com <https://jsonformatter.curiousconcept.com/>
> Best regards,
> Mark Talluto
> livecloud.io <http://livecloud.io/>
> nursenotes.net <http://nursenotes.net/>
> canelasoftware.com <http://www.canelasoftware.com/>
>> On Nov 15, 2018, at 3:09 PM, William Prothero via use-livecode <use-livecode at lists.runrev.com> wrote:
>> Hi, I’m editing a json string (for development uses) and wonder if there is an easy way to validate whether the string is a valid JSON string.
>> Or, perhaps there is an easier way to display and edit a pretty simple array.
>> Suggestions would be helpful. Currently, I convert the array to JSON, put it in a text field, then edit the text field. It would be convenient if it could trap editing errors I might make. The simple way seems to just throw an error and stop execution of the script.
>> William A. Prothero
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode