@marcedwards Try this in the terminal:
> echo '{"test":0.45}' > test.plist
> plutil -convert xml1 test.plist
> cat test.plist
As you can see, the way floats are stored in the XML serialization has nothing to do with how artisanal the original JSON was.
Bonus points: edit the XML version back to 0.45 and run the convert command again.
@eelco Nice! Not entirely sure what you’re saying though. You’re saying 0.45 can’t actually be represented as a double, right? https://www.binaryconvert.com/result_double.html?decimal=048046052053
My comment was that the JSON was authored by a tool, not a human.
@marcedwards Yes correct. My reaction was to your initial statements:
“They’re also full of rounding errors, which makes me thing they were generated by a tool.”
Not errors, and yes plist files are not intended to be hand authored and will generally go through a check / formatting step.
“A human probably typed 0.033 and 0.45, and rounding errors caused the issue in the screenshot.”
This is not true because they are not errors / issues.
Apologies for being a reply-guy! 🙈