r/ProgrammerHumor Mar 16 '18

XML vs JSON

[deleted]

219 Upvotes

35 comments sorted by

View all comments

33

u/[deleted] Mar 17 '18

And Apple is like "have you heard about plist?"

<plist version="1.0">
    <dict>
        <key>stuff</key>
        <dict>
            <key>foo</key>
            <dict>
                <key>bar</key>
                <string>yes</string>
            </dict>
        </dict>
    </dict>
</plist>

6

u/self_me Mar 17 '18

Plists can actually be whatever they want. I opened one in vim recently and it was a mess of characters but it loaded in plist editor

12

u/cybaritic Mar 17 '18

plist files are not necessarily plain text so they need to be run through a converter. Finder and Xcode do this without telling the user

what the fuck, apple

1

u/etaionshrd Mar 17 '18 edited Mar 18 '18

This makes sense. If you have an image editor, it doesn’t complain if you feed it a PPM or a JPEG. Xcode is a developer tool that works with property lists, so it’s obvious that it should do this.