unity-yaml-parser icon indicating copy to clipboard operation
unity-yaml-parser copied to clipboard

preserve formatting of floats in edge cases

Open rafzi opened this issue 2 years ago • 2 comments

some floats would be written as scientific notation using the default representer. this will cause yaml to insert a !!float tag which is not recognized by unity.

for example: 0.000000001 --> !!float 1e-9

rafzi avatar Nov 14 '23 17:11 rafzi

I'll be closing this PR according to comment https://github.com/socialpoint-labs/unity-yaml-parser/issues/66#issuecomment-1812157358.

I'll prepare a new major release in the following weeks tackling the float formatting problem from it's root(treating them as strings when serialized, then let the user decide if they want to convert them to float when manipulating the yaml attributes).

Thank you for you're contribution though, it was much appreciated !

sp-ricard-valverde avatar Nov 15 '23 10:11 sp-ricard-valverde

sounds great thanks for your efforts!

rafzi avatar Nov 15 '23 11:11 rafzi