<TRCSchemaFormat > Protocol Reference

Describes schema format protocol. More...

Inheritance diagram for <TRCSchemaFormat >:

Instance Methods

(id< TRCSchemaData >) - requestSchemaDataFromData:dataProvider:error:
 Creates TRCSchemaData for request from schema file's NSData. More...
 
(id< TRCSchemaData >) - responseSchemaDataFromData:dataProvider:error:
 Creates TRCSchemaData for response from schema file's NSData. More...
 

Detailed Description

Describes schema format protocol.

Currently only JSON and PLIST schema formats available. If you want to add your own schema format, you must implement TRCSchemaFormat, and register your implementation using registerSchemeFormat:forFileExtension: (TyphoonRestClient(Infrastructure))

Method Documentation

◆ requestSchemaDataFromData:dataProvider:error:()

- (id<TRCSchemaData> TRCSchemaFormat) requestSchemaDataFromData: (NSData *)  data
dataProvider: (id< TRCSchemaDataProvider >)  dataProvider
error: (NSError **)  error 

Creates TRCSchemaData for request from schema file's NSData.

Parameters
datafile's data
dataProviderprovides schemas by mapperTag. Used to treat TRCSchemaData with sub-schemes as single schema.
errorerror pointer to write out
Returns
abstract data structure, described by TRCSchemaData protocol

◆ responseSchemaDataFromData:dataProvider:error:()

- (id<TRCSchemaData> TRCSchemaFormat) responseSchemaDataFromData: (NSData *)  data
dataProvider: (id< TRCSchemaDataProvider >)  dataProvider
error: (NSError **)  error 

Creates TRCSchemaData for response from schema file's NSData.

Parameters
datafile's data
dataProviderprovides schemas by mapperTag. Used to treat TRCSchemaData with sub-schemes as single schema.
errorerror pointer to write out
Returns
abstract data structure, described by TRCSchemaData protocol