开发者

create Plist in .net from list of objects

I am working on an iPad app that is fed data via web service returning JSON. Watching some iTunes U episodes, it looks like sending back Plist would save me a ton of time and speed up my app quite a bit on the parsing side of things.

Does anyone know of a .net library that converts objects into this Pli开发者_C百科st to return instead?

EDIT (this is my very limited understanding of this topic): An Plist is a Property List that iOS can use to easily encode and/or parse data. It is very similar to JSON except parsing takes a fraction of the time and can be done in 1 line of code. If your server uses WebObjects then encoding can also be done in 1 line of code, I am using IIS so I need a solution for this if one exists before I write my own.

You can see the videos here: http://developer.apple.com/videos/wwdc/2010/

In particular watch Session 117 - Building a Server-Driven User Experience


You may checkout this project. Sample usage:

object value = ...
string plist = Plist.PlistDocument.CreateDocument(value);

The only requirement is to decorate your object with [Serializable] attribute.


If you're using WebObjects, the appserver from apple, there's a java mirror class of NSPropertyListSerialization that does all of this for you; you can pass it NSArray's, NSDictionaries, etc and it will just work. Not sure if that's what you're talking about; confused as to the WebObjects in your question. HTH's.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜