Elektrine lite

← Feed

@eelco@mstdn.io

Post #1772316

2025-12-02 09:00 UTC

@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.

Replies (1)

  • @marcedwards@mastodon.social 2025-12-02 09:30

    @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.

    Open ##1772317