GiDInterface
GiDInterface copied to clipboard
Writing json - Force parameter as type
trafficstars
Some system must be defined to make sure that a variable is written in the json as it's desired type.
A developer should be able to write:
"name": "3",
"value": 3,
"other": 3.0
where the 3 is considered first as a string, then as an integer, and as a double.
As long as I know Json already distinguish them in this way.
Yes @pooyan-dadvand , but tcl is proudly a non-typed language, so it's always difficult to know if that 3 is an integer, a double or a string
Now I see, where we should add the types, in XMLs? We should try to make it backward compatible as an optional attribute.