On Wednesday, May 7, 2014, Carl Hoefs <newsli...@autonomy.caltech.edu>
wrote:

>
> On May 7, 2014, at 11:38 AM, Wim Lewis <w...@omnigroup.com <javascript:;>>
> wrote:
>
> > Depending on what is *in* your NSDictionary, though, a less opaque
> serialization format might be better, such as one of the property-list
> formats (see NSPropertyListSerialization) or even JSON. These formats can
> only hold a small, non-extensible set of types, and can't encode recursive
> structures or preserve the sharedness of parts of the object graph, but
> have the significant advantage that they are easier to inspect and are
> easier to keep decoupled from implementation details of your app.
>
> I realize I have a ways to go before I grok Cocoa, as I still approach
> things from the minimalist Linux perspective. It's a simple NSDictionary
> with a few strings and numbers in it, so maybe (for the moment) the JSON
> approach might get me going, then I can revisit the issue with a more
> general Cocoa solution.


That will work only as long the types in the NSDictionary are textual types
representable in JSON, as previously stated. If even one element is not,
the archiving will fail. I prefer to archive to binary data because usually
the user never has to read the serialized data in its raw form, plus it
avoids the disadvantages of non-extensibility and no recursion.


>
> Thanks!
> -Carl
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com <javascript:;>)
>
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/sevenbitstech%40gmail.com
>
> This email sent to sevenbitst...@gmail.com <javascript:;>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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

This email sent to arch...@mail-archive.com

Reply via email to