Inherits from NSObject
Conforms to AGEncoder
Declared in AGEncoder.h
AGEncoder.m

Overview

An encoder backed by a NSJSONSerialization

Instance Methods

decode:error:

Creates and returns a property list from the specified data.

- (id)decode:(NSData *)data error:(NSError **)error

Parameters

data

A collection (e.g. NSArray) which is being persisted.

error

An error object containing details of why the decode failed.

Return Value

A property list object corresponding to the representation in data. If data is not in a supported format, returns nil.

Discussion

Creates and returns a property list from the specified data.

Declared In

AGEncoder.h

encode:error:

Returns an NSData object containing a given property list encoded in the respective serialization format.

- (NSData *)encode:(id)json error:(NSError **)error

Parameters

plist

A valid property list object to be encoded.

error

An error object containing details of why the encode failed.

Return Value

An NSData object containing plist encoded in the respective serialization format.

Discussion

Returns an NSData object containing a given property list encoded in the respective serialization format.

Declared In

AGEncoder.h

isValid:

Returns a Boolean value that indicates whether a given property list is valid for a given serialization format.

- (BOOL)isValid:(id)json

Parameters

plist

A property list object.

Return Value

YES if plist is a valid property list in format format, otherwise NO.

Discussion

Returns a Boolean value that indicates whether a given property list is valid for a given serialization format.

Declared In

AGEncoder.h