Closed rafzi closed 6 months ago
I'm getting to the conclusion that we need to treat every float
and int
value as str
to preserve all uniqueness in Unity formatting the documents as it seems impossible to track every use case.
When the library was released we tried to be clever about parsing some numeric values so they were available to manipulate in Python but I think the safest approach would be to let the user's Python code convert a given str value to a Python type before manipulation if required. If numeric values are not manipulated in any way they will be dumped back in the same exact str format the were serialized.
Not sure if the following is related, so i create a new issue: https://github.com/socialpoint-labs/unity-yaml-parser/issues/67
This is probably because it is parsed as int by unityparser, while unity probably parses it as float, where the "-0.0" can be preserved.
Happy to open a PR, but not sure where to start.