I have 2 versions of the project and i need to compare the tags to find out if there are missing tags/configuration in the master project. I have exported the tags (json file type) and when trying to compare the files using Notepad ++ i noticed that json re-shuffles the order of tags and comparison impossible which made me very sad
Is there any other way to compare the tags to find what is missing in the master project?
is using json file for exports not limiting ignition scada a lot as we cannot use excel for heavy duty manipulation of the tags?
Use a tool that understands the semantics of JSON, e.g. http://www.jsondiff.com/
JSON is a human-readable format, but is not plain text.
On the contrary,
Exporting to Excel would be dramatically limiting. Excel’s strict row/column model, by definition, cannot fit nested data. If each row is a tag, where do you put properties that can have multiple values, such as alarms?
Modern Excel versions can directly read JSON files, although you’ll still ultimately have the same problem of shoving multi-dimensional nested data into a strict R/C format: Power Query JSON connector | Microsoft Docs
Using a simple, but structured format, allows for a huge variety of tooling; JSON is a ‘de-facto’ standard for interchange between APIs and has an ecosystem to match. For instance, there’s an incredibly powerful tool call jq that can make very complex operations absolutely trivial; see this post for an example:
Ignition’s JSON output (everywhere) should still be sorted and repeatable for plain text diffs. For VCS compatibility, in addition to human eye-strain reduction. jsondiff and similar tools are a work-around, not a solution.
Where JSON compare tools like jsondiff fail though is where they don’t understand the tag structure built up of name keys and hence is unable to know that these are the keys and their props to compare with each other. A custom compare tool needs to be written which understands this inbuilt structure.
I wrote a tool in python, but it would be great if a compare tool would be added into ignition itself. I think there’s already an idea for it from memory
While you are at it, let me plug the inclusion of defaults for properties. Yes, that makes files bigger. But it makes movement across versions more reliable (defaults can and have changed at times). Omitting them is a hangover from Vision resource optimization that shouldn’t be propagated.
Or make it an option to copy with defaults or without. Sometimes it’s useful not to have defaults, but for the majority of the time it would be better with, although maybe we’re talking about different things… I’m talking about copying json from the context menu