On 5 Dec 2008, at 23:40, "Michael Ash" <[EMAIL PROTECTED]> wrote:

On Fri, Dec 5, 2008 at 6:58 AM, Graham Cox <[EMAIL PROTECTED]> wrote:
I'd love to know what you think is wrong with the file format that keyed
archiving creates that your own would improve on....?

I can only speak for myself, of course, but there are at least two
major problems with it:

1) It is proprietary, albeit reverse-engineerable, making it difficult
to access your data without Mac OS X.

2) It doesn't correctly escape strings, producing all sorts of fun
results if you encode the string "$null":

   NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
@"$null", @"key", nil];
   NSData *data = [NSKeyedArchiver archivedDataWithRootObject: dict];
NSDictionary *dict2 = [NSKeyedUnarchiver unarchiveObjectWithData: data];

$ ./a.out
2008-12-05 10:52:15.637 a.out[1061:10b] *** Terminating app due to
uncaught exception 'NSInvalidArgumentException', reason: '***
-[__NSPlaceholderDictionary initWithObjects:forKeys:]: number of
objects (0) not equal to number of keys (1)'

Does anybody know whether GnuStep has the same NSKeyedArchiver bug?

And, if you have filed a bug, what is its status?


Kind regards,

Gerriet.

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to