Required fields to change a user variable from JSON
Posted: Friday 27 January 2017 17:18
Hi,
The documentation of the JSON interface states that the name of the variable is required when updating the value of the variable. I have seen examples that also use the idx, and posts that hint that both are necessary. My tests show that only the name is required (and the new value of course).
Why can't we use only the idx of the variable rather than the name? Having to use the name means that if I want to change the variable name I have to modify all the programs that access that variable via JSON, including having to reflash some devices that use it. The name is much more likely to be changed, during some refactoring for example, than the idx.
Could this feature be implemented?
Cheers,
Fred
The documentation of the JSON interface states that the name of the variable is required when updating the value of the variable. I have seen examples that also use the idx, and posts that hint that both are necessary. My tests show that only the name is required (and the new value of course).
Why can't we use only the idx of the variable rather than the name? Having to use the name means that if I want to change the variable name I have to modify all the programs that access that variable via JSON, including having to reflash some devices that use it. The name is much more likely to be changed, during some refactoring for example, than the idx.
Could this feature be implemented?
Cheers,
Fred