i need your help with the following task. I would like to read the “view.json” files from the gateway’s project directory. More specifically, I would like to read the parameters and permissions from existing views in a project and write them to an XML file. I have already come across the "ViewConfig" of the com.inductive.perspective.common.config. However, I despair about the command “fromProjectResource(ProjectResource resource, com.inductiveautomation.ignition.common.gson.Gson gson)”. How do I have to initialize and pass the Gson or how do I use this command?
i dont know if its any usefull, but i accessed views (aswell as one that accesses this for vision (older version though)) through this. though it didnt really have anything to do with permissions so i have no idea if you can find anything usefull here.
Thank you for the answer. In fact, I'm currently accessing the parameters in the ".json" via a path. However, there is certainly a more elegant solution for this using the object "ViewConfig" and the "getParamDefinitions" method. However, as I said, I don't know how to initialize the "Gson" object and pass it to the "fromProjectResource" method. I've already tried "PerspectiveModule.createPerspectiveCompatibleGson()", unfortunately without success.