Up

NSSerialization documentation

Authors

Generated by fedor

Contents -

  1. Software documentation for the NSDeserializer class
  2. Software documentation for the NSSerializer class
  3. Software documentation for the NSDeserializer(GNUstep) category
  4. Software documentation for the NSSerializer(GNUstep) category
  5. Software documentation for the NSObjCTypeSerializationCallBack protocol

Software documentation for the NSDeserializer class

NSDeserializer : NSObject

Declared in:
Foundation/NSSerialization.h
Availability: OpenStep

This class is deprecated in favor of NSPropertyListSerialization . It provides a means of recovering a property list (NSArray or NSDictionary plus limited contents) from a byte-array (actually string) representation.
Method summary

deserializePropertyListFromData: atCursor: mutableContainers: 

+ (id) deserializePropertyListFromData: (NSData*)data atCursor: (unsigned int*)cursor mutableContainers: (BOOL)flag;
Availability: OpenStep

Recover a property list (NSArray or NSDictionary plus limited contents) from a byte array. Deprecated in favor of [NSPropertyListSerialization +propertyListFromData:mutabilityOption:format:errorDescription:].

deserializePropertyListFromData: mutableContainers: 

+ (id) deserializePropertyListFromData: (NSData*)data mutableContainers: (BOOL)flag;
Availability: OpenStep

Recover a property list (NSArray or NSDictionary plus limited contents) from a byte array. Deprecated in favor of [NSPropertyListSerialization +propertyListFromData:mutabilityOption:format:errorDescription:].

deserializePropertyListLazilyFromData: atCursor: length: mutableContainers: 

+ (id) deserializePropertyListLazilyFromData: (NSData*)data atCursor: (unsigned*)cursor length: (unsigned)length mutableContainers: (BOOL)flag;
Availability: OpenStep

Recover a property list (NSArray or NSDictionary plus limited contents) from a byte array. 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. Deprecated in favor of [NSPropertyListSerialization +propertyListFromData:mutabilityOption:format:errorDescription:].

Software documentation for the NSSerializer class

NSSerializer : NSObject

Declared in:
Foundation/NSSerialization.h
Availability: OpenStep

This class is deprecated in favor of NSPropertyListSerialization .

It provides a means of producing a byte-array (actually string) representation of a property list (NSArray or NSDictionary plus limited contents).

Method summary

serializePropertyList: 

+ (NSData*) serializePropertyList: (id)propertyList;
Availability: OpenStep

Serialize given property list (NSArray or NSDictionary plus limited contents) into byte array.

Deprecated in favor of [NSPropertyListSerialization +dataFromPropertyList:format:errorDescription:] .


serializePropertyList: intoData: 

+ (void) serializePropertyList: (id)propertyList intoData: (NSMutableData*)d;
Availability: OpenStep

Serialize given property list (NSArray or NSDictionary plus limited contents) into given mutable byte array.

Deprecated in favor of [NSPropertyListSerialization +dataFromPropertyList:format:errorDescription:] .


Software documentation for the NSDeserializer(GNUstep) category

NSDeserializer(GNUstep)

Declared in:
Foundation/NSSerialization.h
Availability: Not in OpenStep/MacOS-X

GNUstep extends deserialization by having the option to make the resulting data more compact by ensuring that repeated strings are only stored once. If the property-list has a lot of repeated strings in it, this will be more space efficient but it will be slower (though other parts of your code may speed up through more efficient equality testing of uniqued strings). The default is NOT to deserialize uniqued strings.

The [+uniquing:] method turns uniquing on/off. Uniquing is done using a global NSCountedSet - see its documentation for details.

Method summary

uniquing: 

+ (void) uniquing: (BOOL)flag;
Availability: Not in OpenStep/MacOS-X

Turns uniquing (collapsing of multiple instances of a single string in the output to one full copy plus references) on/off.

Software documentation for the NSSerializer(GNUstep) category

NSSerializer(GNUstep)

Declared in:
Foundation/NSSerialization.h
Availability: Base
Likely to be changed/moved/removed at 1.17.0

GNUstep extends serialization by having the option to make the resulting data more compact by ensuring that repeated strings are only stored once. If the property-list has a lot of repeated strings in it, this will be both faster and more space efficient but it will be slower if the property-list has few repeated strings. The default is NOT to generate compact versions of the data. The [+shouldBeCompact:] method sets default behavior. The [+serializePropertyList:intoData:compact:] method lets you override the default behavior.
Method summary

serializePropertyList: intoData: compact: 

+ (void) serializePropertyList: (id)propertyList intoData: (NSMutableData*)d compact: (BOOL)flag;
Availability: Base
Likely to be changed/moved/removed at 1.17.0

As [NSSerializer +serializePropertyList:intoData:] but specify whether to produce compacted format.

shouldBeCompact: 

+ (void) shouldBeCompact: (BOOL)flag;
Availability: Base
Likely to be changed/moved/removed at 1.17.0

Specify whether to produce compacted format, with repeated strings only written once.

Software documentation for the NSObjCTypeSerializationCallBack protocol

NSObjCTypeSerializationCallBack

Declared in:
Foundation/NSSerialization.h
Availability: OpenStep

Objects that are not standard property list constituents can adopt this protocol to allow themselves to be serialized by an NSSerializer and deserialized by an NSDeserializer . Note, this mechanism has been deprecated and you should instead use NSArchiver and related facilities to serialize objects that are not ordinary property lists.
Method summary

deserializeObjectAt: ofObjCType: fromData: atCursor: 

- (void) deserializeObjectAt: (id*)object ofObjCType: (const char*)type fromData: (NSData*)data atCursor: (unsigned*)cursor;
Availability: OpenStep

Decodes an object of given type from data at position cursor.

serializeObjectAt: ofObjCType: intoData: 

- (void) serializeObjectAt: (id*)object ofObjCType: (const char*)type intoData: (NSMutableData*)data;
Availability: OpenStep

Encode the given object of given type into data, using a string not a binary representation.


Up