NSCoding and ostream

Posted by Stephen Furlani on Stack Overflow See other posts from Stack Overflow or by Stephen Furlani
Published on 2010-04-22T19:53:16Z Indexed on 2010/04/22 23:53 UTC
Read the original article Hit count: 204

Filed under:
|
|

Is there a better way to serialize an ObjC object than using /NSKeyedArchive?

I need to distribute the object through a C++ std:ostream-like object to put on another computer.

The object has over 122 members of various types... for which wants me to

[coder encodeObject: (id) forKey: @"blah"];

for all of them...

Does anyone have a nice Perl Script that will at least write it out? I don't even know if the objects it contains implement which means this could turn into a huge ugly mess since I can't change the source of the object - I'll have to inherit & add the @interface to it...

Or am I being dumb? Apple's guide doesn't help me since archiving to XML won't pass nicely though the ostream.

Is there a better way to do this?

-S!

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iostreams