It's difficult to know if the node property added is valid json
When we add a property to a node through the UI, if the property is not valid JSON (because we forgot something for ex), Rudder will happily stringify the value. Which is nice from him, but is a disaster from an usability point of view. We must provide to the user a mean so that he can assess "here Rudder, this is JSON, yell at me if you don't understand".
That could be a little dropdown at the begining of the "value" part where the user would choose between "string" and "json", and Rudder would act accordingly.
#1 Updated by François ARMAND 8 months ago
- Effort required changed from Very Small to Small
- Priority changed from 79 to 66
Raphael, could you evaluate the difficulty for that? It seems that it's pure JS, with a select box that let users choose between string|json (perhaps like the one that let user choose between normal|js in directive parameters), plus a JS check that the input is JSON on [Add] click when JSON is chosen, plus a "stringify" call on [Add] click when "string" is chosen (to force json to became a string) - and actually, the logic on [add] click is more likelly "try to parse value as JSON. If it succeed and string is selected, stringify. If it fails and json is selected, error message. In other case do nothing".
#10 Updated by Raphael GAUTHIER 6 months ago
#11 Updated by Raphael GAUTHIER 6 months ago
#18 Updated by Vincent MEMBRÉ 5 months ago
- Status changed from Pending release to Released