• 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
Re: Preserving types in propertyLists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Preserving types in propertyLists (From: John Lombardo <email@hidden>)

  • Prev by Date: How to hide NSTableColumn using bindings
  • Next by Date: Re: Preserving types in propertyLists
  • Previous by thread: Preserving types in propertyLists
  • Next by thread: Re: Preserving types in propertyLists
  • Index(es):
    • Date
    • Thread