Re: Preserving types in propertyLists
Re: Preserving types in propertyLists
- Subject: Re: Preserving types in propertyLists
- From: Scott Anguish <email@hidden>
- Date: Thu, 6 May 2004 17:05:29 -0400
nope. You need to use the XML format.
On May 6, 2004, at 3:20 PM, John Lombardo wrote:
For a project I'm working on I have to be able to convert data
structures to and from text, and Cocoa's -propertyList and
-description methods are great for this. In the interest of
dramatically reducing file size, I've been using the propertylist
shorthand format rather than complete XML, however recently I've run
in to an issue with needing to preserve the datatypes for floats and
integers. I can reset this manually after the data has been read in by
iterating through the data structure, however this is an evil cludge
that I envisage will eventually break my program.
What I would like to know is, is there a way to emulate this:
<dict>
<key>aKey</key>
<Integer>1024</integer>
</dict>
in this format:
{aKey=1024;} <- "1024" is read in as a string.
If there is a way to use the second format to represent integers and
floats as NSNumbers, that would make my job better :)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.