All Downloads are FREE. Search and download functionalities are using the official Maven repository.

objc.ResponseDeserializer-header.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
#import 

{{>licenceInfo}}

/**
 * A key for deserialization ErrorDomain
 */
extern NSString *const {{classPrefix}}DeserializationErrorDomainKey;

/**
 * Code for deserialization type mismatch error
 */
extern NSInteger const {{classPrefix}}TypeMismatchErrorCode;

/**
 * Code for deserialization empty value error
 */
extern NSInteger const {{classPrefix}}EmptyValueOccurredErrorCode;

/**
 * Error code for unknown response
 */
extern NSInteger const {{classPrefix}}UnknownResponseObjectErrorCode;

@protocol {{classPrefix}}ResponseDeserializer 

/**
 * Deserializes the given data to Objective-C object.
 *
 * @param data The data will be deserialized.
 * @param className The type of objective-c object.
 * @param error The error
 */
- (id) deserialize:(id) data class:(NSString *) className error:(NSError**)error;

@end

@interface {{classPrefix}}ResponseDeserializer : NSObject <{{classPrefix}}ResponseDeserializer>

/**
 *  If an null value occurs in dictionary or array if set to YES whole response will be invalid else will be ignored
 *  @default NO
 */
@property (nonatomic, assign) BOOL treatNullAsError;

@end




© 2015 - 2024 Weber Informatics LLC | Privacy Policy