Re: Property List Format vs NSKeyedArchiver Format
Re: Property List Format vs NSKeyedArchiver Format
- Subject: Re: Property List Format vs NSKeyedArchiver Format
- From: Michael Ash <email@hidden>
- Date: Wed, 14 Oct 2009 10:47:38 -0400
On Tue, Oct 13, 2009 at 6:24 PM, Ken Ferry <email@hidden> wrote:
> On Tue, Oct 13, 2009 at 2:40 PM, Jens Alfke <email@hidden> wrote:
>
>>
>> On Oct 13, 2009, at 1:08 PM, Bridger Maxwell wrote:
>>
>> I would like to read more on the NSKeyedArchiver XML format, but can't
>>> find
>>> documentation on it. Is it open?
>>>
>>
>> No. It's undocumented and could change in the future; writing code for
>> another platform that parses it would probably be a bad idea.
>
>
> I agree.
>
> But as you originally noted, there's nothing stopping you from writing your
> own coder subclasses that read and write a format you understand.
>
> Nor is there anything stopping you from dropping in classes written by
> someone else. You could use
> MAKeyedArchiver<http://www.mikeash.com/?page=software/source.html>.
> As long as the source is in your app, you control the format.
Note that MAKeyedArchiver is old and crusty. In particular, it was
written at a naive time in my life when it seemed like Macs would be
big-endian forever. The archives it creates are not cross-compatible
between PPC and x86. I think that it *might* work in 64-bit mode,
simply because I was lucky enough to use int everywhere and their size
didn't change, but I wouldn't count on it.
In short: MAKeyedArchiver is probably instructive, and may even be a
good base to start with when creating your own, but please don't use
it as-is.
(If anyone feels like fixing it up to use proper stdint types and byte
swapping functions, I'll be happy to add your contributions to the
package.)
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden