JSON Libraries Between Versions of Studio
Doug Easterbrook
doug at artsman.com
Wed Jan 25 18:35:56 UTC 2023
hi Das:
there is a feature in the JSON export that was requested in Nov 2020, specifically for this purpose.
The notion is to allow people to use varying versions of omnis and pull in JSON. The JSON import was modified to ignore attributes that it didn’t know about on import.
say, for example, that studio 10.22 knew about an attribute of a table class called. $ImReallyNew
importing it into studio 10.2 where it didn’t exist — would cause it to be ignored.
the preference is in ‘ExportImportJsonOptions’ (see $root.$prefs)
and the paramter is. ‘importtreatsunknownPropertyAsWarning’
that leaves it to the programmer to be aware of using newish features, or figure out ways to code around it. For the example f ‘$imReallyNew’, you would do something t the effect of
calculate tempString as ‘$imReallyNew’
if ominsVersion>=10.22
calculate list.[tempString] as ’some value’
end if
meaning you’d do version checks on code and use various forms of square bracket notation to allow the newer version of omnis to use the attribute and older version of omnis to ignore it.
You can look at the $root.$prefs in studio 10.1. I do not think it is there, so I think you’ll be out of luck for the moment.
The point of the feature is that what you want to do is a really legitimate kind of thing for backward compatibility of Git repositories….
Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 650-1978
> On Jan 25, 2023, at 9:56 AM, Das Goravani <goravanis at gmail.com> wrote:
>
>
> Hello All,
>
> We’re a team of 3 people. We are on a project that is in 10.1. It uses Window Classes and Remote Forms both extensively.
> Problem with 10.1 is that the current field is Black if you are on Monterey or later.
> So it’s visually really impairing.
>
> We pool our work not with the VCS but with an SVN, another type of VCS.. and it uses JSON
>
> From Omnis you can export your libraries into JSON. The SVN pools those JSON files.
>
> What I’m wondering, is can I work in 10.2 while the other two work in 10.1 ?
>
> This comes down to the question WHAT if anything, is different between the JSON output of these two versions?
>
> Is the Omnis version number stamped into the JSON such that it will object in some way?
>
> You see if the output is identical between these two, then there would not be a problem with me working in the different version.
>
> I do realize there were some enhancements to various things between these two versions.
>
> That could result in JSON output which only 10.2 understands.
>
> If you were to avoid the enhancements, would you be relatively assured that your 10.2 JSON output can be read and understood by 10.1 ?
>
> Seems risky to me, but I’m squeamish easily.
>
> Anybody know anything about this?
>
> It may come down to avoiding the 10.2 enhanced features and that’s it. So a read of the WhatsNew, make a list of what it says got upgraded.. avoid those upgraded settings, functions, etc..
>
> Opinions?
>
> Thanks
>
> Das
> _____________________________________________________________
> 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