patsplat / plist

All-purpose Property List manipulation library
http://www.rubydoc.info/gems/plist
MIT License
306 stars 71 forks source link

Support json plist format #7

Open grosser opened 13 years ago

grosser commented 13 years ago

Is it possile to parse something like this ?

https://raw.github.com/kangax/textmate-js-language-syntax-file/master/JavaScript.plist

bleything commented 13 years ago

Nope. That's not a plist, just some random file with a plist extension.

patsplat commented 13 years ago

Is that a json plist?

On Wed, Oct 5, 2011 at 11:49 AM, Michael Grosser < reply@reply.github.com>wrote:

Is it possile to parse something like this ?

https://raw.github.com/kangax/textmate-js-language-syntax-file/master/JavaScript.plist

Reply to this email directly or view it on GitHub: https://github.com/bleything/plist/issues/7

Patrick May +1 (347) 232-5208

bleything commented 13 years ago

That was my initial thought too, but I looked around and couldn't find any official spec for json plists. I think maybe it's something that TextMate has done to encode plists in a friendlier format?

If there's a standard, even if it's emerging, I'd be happy to add support for it. I just want documentation so we don't end up implementing something broken.

grosser commented 13 years ago

I thin kits this: http://en.wikipedia.org/wiki/Property_list

From the look of it its the same content, just another format

bleything commented 13 years ago

Well, just about any data structure can be turned into a plist. My opinion is that if plutil doesn't speak it, we shouldn't support it.

That said... turns out plutil has a json format now. I can't find any docs, but it should be relatively easy to write tests to verify that we're doing the right thing.

Reopening this request.

grosser commented 13 years ago

i tried this: http://scw.us/iPhone/plutil/plutil.pl but it did not read or convert this file, how did you do it ?

bleything commented 13 years ago

$ man plutil

:)

grosser commented 13 years ago

also did not work, maybe its outdated on ubuntu...

bleything commented 13 years ago

Ah, ubuntu. plutil is part of OSX. Can't help you on other platforms.

patsplat commented 8 years ago

Don't have any problems with supporting NeXT property lists but it seems a bit esoteric. Parsing and emitting binary and json plists is definitely a desired feature.

jasonm23 commented 1 year ago

@bleything FYI that is not "just some random file with a plist extension."

It's a NextStep plist format (aka the original plist format), It is parsable by both plutil and PlistBuddy.


Given that XCode generates these files today and has done since ... well, a long time. (i.e. since it existed)

Being able to parse these is useful.

jasonm23 commented 1 year ago

I'd recommend the issue be re-titled correctly, as this is not a JSON format and obviously leads to confusion.

bleything commented 1 year ago

@jasonm23 thanks for the info, but I haven't been involved in this project for many years. I think this is @mattbrictson's call now.

jasonm23 commented 1 year ago

@patsplat I assume it's your decision.