• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Serializing NSDictionary for network transfer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Serializing NSDictionary for network transfer


  • Subject: Re: Serializing NSDictionary for network transfer
  • From: Joseph Dixon <email@hidden>
  • Date: Wed, 07 May 2014 13:21:58 -0500

Consider NSJSONSerialization.

-jwd// Joseph W. Dixon

OS X 10.9
Newb questions re: serializing an NSDictionary for network transfer to another process. I've read over the Apple documentation, but it seems to detail the methods involved but not how to use serialization, and some methods seem to require writing archives or plist files to disk. So, I must be approaching this all wrong...

(1) I see that NSDictionary has an encoding method:

- (void)encodeWithCoder:(NSCoder *)coder;

but this returns (void), which is puzzling to me. I would expect it to return (void *) to a malloced region containing the serialization. Where does the object serialization reside, and how do I access it?

(2) On the receiving end, I see that NSDictionary has the method:

- (id)initWithCoder:(NSCoder *)coder;

How do I apply this method to the byte stream that I have received to instantiate a populated NSDictionary object?

-Carl


_______________________________________________

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
_______________________________________________

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


  • Follow-Ups:
    • Re: Serializing NSDictionary for network transfer
      • From: Carl Hoefs <email@hidden>
References: 
 >Serializing NSDictionary for network transfer (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Serializing NSDictionary for network transfer
  • Next by Date: Re: Serializing NSDictionary for network transfer
  • Previous by thread: Serializing NSDictionary for network transfer
  • Next by thread: Re: Serializing NSDictionary for network transfer
  • Index(es):
    • Date
    • Thread