socialpoint-labs / unity-yaml-parser

Python3 library to manipulate Unity serialized files from outside the Unity Editor.
https://pypi.org/project/unityparser/
MIT License
137 stars 24 forks source link

Enforce valid scalar value types when serializing #3

Closed sp-ricard-valverde closed 5 years ago

sp-ricard-valverde commented 5 years ago

Right now it is possible to add/change the loaded python data to contain any python type, and during serialization it will dump incorrectly(adding nasty tag directives) if the values were not str.

str type should be enforced, either by asserting or by silently converting the type at serialization time.

sp-ricard-valverde commented 5 years ago

We should support python basic types being dumped without tags, enforcing str is not a proper solution.