So I know that document tags, or at least it seems this way, are not supported as a Vision Client Tag. Is there a good alternative? If I stored a JSON-friendly string into a client tag and then pulled data using the jsonGet expression, would that effectively be the same?
We are exploring being able to have multiple themes for our Vision applications, and the themes can get pretty involved with each visual device type having different options etc... So we are exploring creating a using a single JSON document that defines the theme, and then having each visual device look into that JSON document to determine what color it needs to be displaying.
I don't want to go down a road that we are going to regret once this goes live, so I'm asking now before I get into trouble lol.
I think that might get hairy... I tested loading a JSON string encoded with system.util.jsonEncode into a string client tag, and then binding to it with an expression like so: jsonGet({[client]Configuration/ThemeString},'Colors.testing') and it came back like I expected. I'm thinking in lieu of having a formal Document tag, this should work. Any major issues I need to be aware of? Size issues etc?
jsonGet() is absurdly inefficient. If you really want to use a string client tag, you should decode into a root container document property. Then you can use the native expression bracket operator to extract from that efficiently.
So if I have a bunch of templates to represent devices that need access to this data, would it be better to have a custom property on each of the templates that is bound to the string?
We are also exploring datasets as this is turning out to be something that will fit into a dataset. Originally we thought it might be a 3 dimensional lookup table, but we are trimming it down to a regular lookup table.
Right now we are scripting the color access though a convoluted runScript that just works, but doesn't give us the flexibility to make easy changes. I was hoping a document tag, but it looks like that might not work at the moment.
Could I potentially load a JSON into global using your system.util.globalVarMap and then read it back out as a binding from globalVarMap expression?