Retired Documents Library

Developer

Foundation Framework Reference NSDeserializer Class Reference

Options
Deployment Target:

On This Page
Language:

NSDeserializer

The NSDeserializer class declares methods that convert a representation of a property list (as contained in an NSData object) into a structure of property list objects in memory. The NSDeserializer class object itself provides these methods—you don’t create instances of NSDeserializer. Options to these methods allow you to specify that container objects (arrays or dictionaries) in the resulting graph be mutable or immutable; that deserialization begin at the start of the data or from some position within it; or that deserialization occur lazily, so a property list is deserialized only if it is actually going to be accessed.

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable

Objective-C

@import Foundation;

Availability


Deprecated in Mac OS X v10.2.
Not available to 64-bit applications.
  • Returns a property list object from a given location in a given serialized representation of a property list.

    Declaration

    Objective-C

    + (id)deserializePropertyListFromData:(NSData *)data atCursor:(unsigned *)cursor mutableContainers:(BOOL)mutable

    Parameters

    data

    A serialized representation of a property list.

    cursor

    mutable

    If YEStrue and the property list object is a dictionary or an array, the recomposed object is made mutable

    Return Value

    A property list object corresponding to the representation in data at the location cursor. Returns nil if the property list object is not valid for property lists.

    Import Statement

    Objective-C

    @import Foundation;

    Availability

    Deprecated in Mac OS X v10.2.

    Not available to 64-bit applications.

  • Returns a property list object from given serialized data, optionally making the list elements mutable.

    Declaration

    Objective-C

    + (id)deserializePropertyListFromData:(NSData *)serialization mutableContainers:(BOOL)mutable

    Parameters

    serialization

    A serialized representation of a property list.

    mutable

    If YEStrue and the property list object is a dictionary or an array, the recomposed object is made mutable.

    Return Value

    A property list object corresponding to the representation in serialization, or nil if serialization does not represent a property list.

    Import Statement

    Objective-C

    @import Foundation;

    Availability

    Deprecated in Mac OS X v10.2.

    Not available to 64-bit applications.

  • Returns a property list from a given location in a given serialized representation of a property list.

    Declaration

    Objective-C

    + (id)deserializePropertyListLazilyFromData:(NSData *)data atCursor:(unsigned *)cursor length:(unsigned)length mutableContainers:(BOOL)mutable

    Parameters

    data

    A serialized representation of a property list.

    cursor

    The cursor location.

    length

    The number of bytes to read.

    mutable

    If YEStrue and the object is a dictionary or an array, the recomposed object is made mutable.

    Return Value

    A property list from data at location cursor, or nil if data does not represent a property list.

    Discussion

    The deserialization proceeds lazily—that is, if the data at cursor has a length greater than length, a proxy is substituted for the actual property list as long as the constituent objects of that property list are not accessed.

    Import Statement

    Objective-C

    @import Foundation;

    Availability

    Deprecated in Mac OS X v10.2.

    Not available to 64-bit applications.