Up

NSPropertyListSerialization class documentation

Authors

Richard Frith-Macdonald (rfm@gnu.org)

Copyright: (C) 2004 Free Software Foundation, Inc.

Software documentation for the NSPropertyListSerialization class

NSPropertyListSerialization : NSObject

Declared in:
Foundation/NSPropertyList.h
Standards:

The NSPropertyListSerialization class provides facilities for serialising and deserializing property list data in a number of formats.

You do not work with instances of this class, instead you use a small number of claass methods to serialized and deserialize property lists.

Method summary

dataFromPropertyList: format: errorDescription: 

+ (NSData*) dataFromPropertyList: (id)aPropertyList format: (NSPropertyListFormat)aFormat errorDescription: (NSString**)anErrorString;

Creates and returns a data object containing a serialized representation of plist. The argument aFormat is used to determine the way in which the data is serialised, and the anErrorString argument is a pointer in which an error message is returned on failure ( nil is returned on success).


propertyList: isValidForFormat: 

+ (BOOL) propertyList: (id)aPropertyList isValidForFormat: (NSPropertyListFormat)aFormat;

Returns a flag indicating whether it is possible to serialize aPropertyList in the format aFormat.


propertyListFromData: mutabilityOption: format: errorDescription: 

+ (id) propertyListFromData: (NSData*)data mutabilityOption: (NSPropertyListMutabilityOptions)anOption format: (NSPropertyListFormat*)aFormat errorDescription: (NSString**)anErrorString;

Deserialises dataItem and returns the resulting property list (or nil if the data does not contain a property list serialised in a supported format).
The argument anOption is ised to control whether the objects making up the deserialized property list are mutable or not.
The argument aFormat is either null or a pointer to a location in which the format of the serialized property list will be returned.
Either nil or an error message will be returned in anErrorString.



Up