Array editing or Validate JSON string?

JJS jjs at krutt.org
Fri Nov 16 11:22:37 EST 2018


https://jsonlint.com/


not there are a few forms to write JSON


Op 16-11-2018 om 02:55 schreef William Prothero via use-livecode:
> Thanks, Terry:
> I’ll give it a whack.
> Bill
>
>> On Nov 15, 2018, at 5:19 PM, Terry Judd via use-livecode <use-livecode at lists.runrev.com> wrote:
>>
>> Hi Bill - I convert the JSON (jsonImport) to an array then use a treeview widget to display it. I then use an actionDoubleClick handler in the widget script to grab the appropriate array element and display it in an ask dialog. The value goes back into the array and I export the array back to JSON (jsonExport). Works well as long as the JSON elements don't contain large amounts of text - in which case you might need a custom dialog for displaying and editing the contents.
>>
>> Terry...
>>
>> On 16/11/2018 10:10 am, "use-livecode on behalf of William Prothero via use-livecode" <use-livecode-bounces at lists.runrev.com on behalf of 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.
>>
>>     Best,
>>     Bill
>>
>>     William A. Prothero
>>     http://earthlearningsolutions.org
>>
>>     _______________________________________________
>>     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
>> 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
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list