< HRFormatterProtocol > Protocol Reference

#import <HRFormatterProtocol.h>

Inherited by HRFormatJSON, and HRFormatXML.

List of all members.


Static Public Member Functions

(NSString *) + extension
(NSString *) + mimeType
(id) + decode:error:
(NSString *) + encode:error:

Detailed Description

Formatters used in formatting response data Formatters should be able to encode and decode a specific data type.

Member Function Documentation

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

Takes the format and turns it into the appropriate Obj-C data type.

Parameters:
data Raw data to be decoded.
error Returns any errors that happened while decoding.

+ (NSString *) encode: (id)  object
error: (NSError **)  error 

Takes an Obj-C data type and turns it into the proper format.

Parameters:
object The Obj-C object to be encoded by the formatter.
error Returns any errors that happened while encoding.

+ (NSString *) extension  

The file extension. Example: json, xml, plist, n3, etc.

+ (NSString *) mimeType  

The mime-type represented by this formatter


The documentation for this protocol was generated from the following file: