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 : https://mikeash.com/pyblog/friday-qa-2013-08-30-model-serialization- with-property-lists.html. You will likely many more ideas there. Cheers! Manoah F. Adams federaladamsfamily.com/developer === On

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

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

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Quincey Morris
On May 7, 2014, at 11:17 , Carl Hoefs newsli...@autonomy.caltech.edu 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

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

Re: Serializing NSDictionary for network transfer

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

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Alex Zavatone
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

Re: Serializing NSDictionary for network transfer

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

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Carl Hoefs
On May 7, 2014, at 12:06 PM, Alex Zavatone z...@mac.com 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,

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