• 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
AW: NSDictionary to NSData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: NSDictionary to NSData


  • Subject: AW: NSDictionary to NSData
  • From: Helge Staedtler <email@hidden>
  • Date: Thu, 22 Sep 2005 11:57:03 +0200

yeah, thats also a good alternative. I practiced it in one project for
exactly the mentioned problem (saving it as CLOB in the DB)

object-serialization ist a good thing. But you have to be very very careful
if you change one of the classes which get serialized. There exist some
restrictions:

1) If you rename a class or the package-name/location of an object which got
serialized you will not be able to unserialize it under the new name. so in
a way you trade off some inflexibility here. using XML will give you more
flexibility but also more coding-overhead.

2) if you add class-variables to a class which will be used for
serialization declare them as "transient" otherwise they get serialized too,
and older serialized objects won't unserialize any longer ('cause the
class-var-signature does not fit any longer).

good thing is: serialization produces smaller files/data then XML.

regards,
helge


Am 22.09.2005 11:01 Uhr schrieb "Wolfram Stebel" unter
<email@hidden>:

> Am 22.09.2005 8:06 Uhr schrieb "Dave Elsner" unter <email@hidden>:
>
>> Hi,
>>
>> Does any one know an easy way of converting an NSDictionary to
>> NSData   and back again. The reason being I would like to store a
>> Dictionary in the DB as a blob.
> I never did it and i did no research on it, but could you serialize it?
>
> Wolfram
>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

--
Helge Städtler

- Expect and Respect.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: NSDictionary to NSData (From: Wolfram Stebel <email@hidden>)

  • Prev by Date: Re: NSDictionary to NSData
  • Next by Date: Re: Deploying on Development System
  • Previous by thread: Re: NSDictionary to NSData
  • Next by thread: Re: NSDictionary to NSData
  • Index(es):
    • Date
    • Thread