Re: Serializing NSDictionary for network transfer

2014-05-08 Thread Manoah F. Adams
Hi, Thats great. I first learned about this method from Mike Ash's blog post : . You will likely many more ideas there. Cheers! Manoah F. Adams federaladamsfamily.com/developer === On

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Manoah F. Adams
On May 7, 2014, at 12:30 , Carl Hoefs wrote: For the moment, I'm using only NSStrings and NSNumbers. I'm sending data back and forth between OSX and iOS devices, and NSDictionary is a very convenient container. Once I show that this will work then the pressure will ease off and I'll have ti

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Carl Hoefs
On May 7, 2014, at 12:06 PM, Alex Zavatone wrote: > If your dictionary has only text values, this should be no problem with the > NSJSONSerialization, but if you're sending images, you'll need to convert the > images to 16 bit encoded NSData objects. > > I guess the bigger question is, "what a

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread SevenBits
On Wednesday, May 7, 2014, Carl Hoefs wrote: > > On May 7, 2014, at 11:38 AM, Wim Lewis > > 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

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Alex Zavatone
If your dictionary has only text values, this should be no problem with the NSJSONSerialization, but if you're sending images, you'll need to convert the images to 16 bit encoded NSData objects. I guess the bigger question is, "what are the data types within your dictionary"? If it's just text

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Carl Hoefs
On May 7, 2014, at 11:38 AM, Wim Lewis 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-exte

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Wim Lewis
On 7 May 2014, at 11:17 AM, Carl Hoefs wrote: > 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 wr

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Quincey Morris
On May 7, 2014, at 11:17 , Carl Hoefs wrote: > (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

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Carl Hoefs
On May 7, 2014, at 11:21 AM, Joseph Dixon wrote: > Consider NSJSONSerialization. Hmm, I hadn't come across NSJSONSerialization. Looks straightforward to use. Thanks! -Carl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post adm

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Joseph Dixon
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 t

Serializing NSDictionary for network transfer

2014-05-07 Thread Carl Hoefs
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