Parse a JSON Tag?

Is there any way of parsing a json (dict) to check if is correct as a tag configuration? Also, is this possible with the different type of tags or even they are different they are treated as the same?

I'm not sure if I'm explaining myself.

Thx!

I’m sure you could, do you have standard tag configurations you could check against? What defines “correct”

There's no easily accessible function that will check whether a given bundle of tag configuration will work other than creating the tags, no. The tag system is (deliberately) very dynamic under the hood, so what is "valid" configuration is not something that can be determined statically - it's a function of your Ignition version (as we add more valid capabilities to the base platform) but also what modules you have installed.

You could, in theory, have a function that tested against the current installed state - but no one has really asked us for one yet :smiley:

What's the thing you're ultimately trying to do with this validation?

The closest you can get right now is to retrieve the tag configuration model from a tag provider (via context's .tagManager then .getTagConfigModelAsync(provider)). You can interrogate the model with .getApplicableProperties(propertyset) for a given configuration (turned into a PropertySet). Not particularly simple.

Hi! I'm back from my vacation.

We are currently designing a tool so you can import/export tags directly from an excel.
Very briefly:

Excel with Provider data → Import to toolBuild JSONCheck with current ProviderDownload Excel (marked with error/differences) → Check the Excel yourself with possible problems in the data → Import second excel to toolImport/Merge/Delete tags in Provider

We are currently defining the base Excel and the building the json part. So I was looking to check if each tag (each row of the excel) that I process is right.

However I get that the right is not something defined and something a bit dependant on other things.

You might want to study the techniques in this tool on the Exchange: