Friendly edit JSON interface
Doug Easterbrook
doug at artsman.com
Mon Mar 31 15:55:15 UTC 2025
hi Xavier.
It was a 'best guess' in the first place. good luck.
Doug Easterbrook
doug at artsman.com
Phone (403) 650-1978
> On Mar 31, 2025, at 1:52 AM, IT <it at plastipol.com> wrote:
>
> Hi Doug,
>
> Yes I saw this suspicious library inside Omnis folder structure, but it is related with another Omnis menu option: "Tools/Add-on/JSON Control Editor…”.
>
> I think that this library can't run this config.json editor window. Perhaps is not written with Omnis code?
>
> I will contact with Omnis support about the possibility to make this interface accessible to developers, something like SQL Query Builder is.
>
> regards
>
> xavier
>
>> El 29 mar 2025, a las 0:28, Doug Easterbrook <doug at artsman.com> escribió:
>>
>> hi Xavier.
>>
>> I saw the JSON config editor a while back — and never looked at it again. So I had to go and find out how to open it from the online help (it wasn’t necessarily obvious :)
>>
>>
>> now that I had a peek at it… its a reasonable start. It is a bit like looking at files in the finder in the 'column' view where a folder -> folder-> perhaps another folder. In the Json window, each level has a column in the window, and it isn’t designed to go much more than two levels.
>>
>> If I was playing with this, I’d also want to have a side by side view of the actual JSON being created/edited. That wouldn't be to hard as omnis has a pretty json function to display things. Advantage of that would be to show how changing the config, changes the JSON .. and is a helpful aid teaching structure of JSON.
>>
>>
>>
>> that being said, Omnis has already done the work . There seems to be a library in firstRunInstall/Startup that is aptly called jsoncontroleditor.lbs which I suspect might be the ticket for you. It is in the same place as other libraries like the VCS.lbs. If you ask Omnis for the source for it, it might just be what you want.
>>
>> or ask them to put a version into the 'Hub' and ’Samples' which is where we can go to find out how to use certain things.
>>
>> hope that might help.
>>
>>
>>
>>
>>
>>
>>
>> Doug Easterbrook
>> doug at artsman.com
>> Phone (403) 650-1978
>>
>>> On Mar 27, 2025, at 10:08 AM, IT <it at plastipol.com> wrote:
>>>
>>> Hi Doug,
>>>
>>> Yes, I can write my own, but could be time consuming.
>>> I know the user must understand the data structure of a JSON, but I want avoid worrying about syntax.
>>>
>>> I‘m looking for something like Omnis config.json editor. Have you tested the Omnis config.json editor?
>>>
>>> regards
>>>
>>> xavier
>>>
>>>
>>>> El 27 mar 2025, a las 15:51, Doug Easterbrook via omnisdev-en <omnisdev-en at lists.omnis-dev.com> escribió:
>>>>
>>>> hi Xavier
>>>>
>>>> Is it the syntax of JSON that you are trying to hide from people?
>>>>
>>>> eg:
>>>> 1) if they can fill table of values (like a headed list with a name and place to enter a value) and
>>>> 2) you turn that into JSON behind the scenes
>>>> 3) and you are responsible for items with multiple values
>>>>
>>>> … is that what you are looking for?
>>>>
>>>>
>>>> or are you looking for something where person has options like:
>>>> 1) add row (new root level thing)
>>>> 2) add column to row (add a variable to the row)
>>>> 3) add row to column (add a row of things to a column)
>>>> 4) add multiple values to a column
>>>>
>>>> I only ask because JSON can describe multiple rows and a hierarchy of data, so its reasnable to know what you want to limit people to.
>>>>
>>>>
>>>>
>>>> we do, in our app, have something that translates json into a table of name value pairs (column one = name, column 2 = values) to display raw results from calls to credit card companies or other things that return json. mostly for tech support purposes so that the user can read values to us.
>>>>
>>>> We also use JSON to store some SQL results in what we call custom plugins for our code that does specific special things for certain customers. That way, the user can view the JSON stored in the table in a 'headed list' of name value pairs and see words that are pertinent to their business. It helps them see hoe the special code has affected a sale or the price of tickets.
>>>>
>>>>
>>>>
>>>> for the most part we use our xcomp jsoncpp to encode and decode rows as it has a syntax and calling structure that is much more like what you’d see in postgres. It has a JSON document and you can add rows, columns, values and access them using 'dot notation'. which ins postgres is the -> operator
>>>>
>>>> eg pulling something that is nested 3 levels deep out of a document has nested calls like below
>>>>
>>>> Do pRoot.$get(cUserMetadataKey).$get(LowerVarName).$listtovalue(pRow.[pVarName])
>>>>
>>>>
>>>> putting data back in uses '$set'
>>>>
>>>>
>>>> is that the sort of JSON helper approach you are looking for (you’d have to build the interface) but it has definite advantages poking something into a document.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Doug Easterbrook
>>>> doug at artsman.com
>>>> Phone (403) 650-1978
>>>>
>>>>> On Mar 27, 2025, at 2:28 AM, IT <it at plastipol.com> wrote:
>>>>>
>>>>> Hi all,
>>>>>
>>>>> I’m starting to migrate some structure data (multiple sql related tables) to JSON.
>>>>>
>>>>> In omnis, there is an option called "Edit configuration" that opens a window for editing config.json
>>>>>
>>>>> This window is a powerful tool for editing JSON. It allows you to edit complex JSON structures with an easy user interface, requiring zero knowledge of JSON syntax.
>>>>>
>>>>> It would be great if Omnis allow developers to use this window as a built-in graphical interface for editing JSONs, something like built in "Query Builder” and provide a downloadable version that could be integrated in our own APPs.
>>>>>
>>>>> That said, has any one found an external app or web site that can edit JSON without needing to use structural character likes {}, :, [, and ] to build or edit a JSON?
>>>>> All editors I've seen are targeted for developers. Some are better than others, but I am looking for something suitable for final users without technical knowledge, something similar to Omnis's config.json editor window.
>>>>>
>>>>> Any advice?
>>>>>
>>>>> regards
>>>>>
>>>>> xavier
>>>>>
>>>>>
>>>>> _____________________________________________________________
>>>>> Manage your list subscriptions at https://lists.omnis-dev.com
>>>>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
>>>>
>>>> _____________________________________________________________
>>>> Manage your list subscriptions at https://lists.omnis-dev.com
>>>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
>>>
>>> _____________________________________________________________
>>> Manage your list subscriptions at https://lists.omnis-dev.com
>>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
>>
>
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en
mailing list