On Jul 1, 2012, at 8:23 AM, Alexander Hartner wrote:

> I am looking at available option to send an NSImage to a web server.

The simplest way would jut be to PUT the raw JPEG/PNG/whatever data to a URL on 
the server. No need to encode it.

> I came across gSoap however its licensing model makes it not suitable.

Plus, using SOAP for this would be like using an elaborate rickety Rube 
Goldberg device to swat a fly ;-)

> Using REST / JSON seems like an easy option however NSDATA does not seem to 
> be supported by the JSON Serialiser.

Yes, JSON doesn't support binary data, and the serializer doesn't do any magic 
type transformations for you.

It's not a good idea to transmit base64-encoded data anyway, if you can 
possibly avoid it, as it'll make it ⅓ larger.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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