HUBComponentImageDataJSONSchema
@protocol HUBComponentImageDataJSONSchema <NSObject>
Protocol defining the public API of a JSON schema for HUBComponentImageData
You don’t conform to this protocol yourself, instead an object matching the default Hub Framework schema will
come attached to a HUBJSONSchema
. You are free to customize a schema in whatever way you want, but you must
do so before registering it with the HUBJSONSchemaRegistry
.
The Hub Framework uses a path-based approach to JSON parsing, that enables you to describe how to retrieve data
from a JSON structure using paths - sequences of operations that each perform a JSON parsing task, such as going
to a key in a dictionary, or iterating over an array. For more information about how to construct paths, see the
documentation for HUBJSONPath
and HUBMutableJSONPath
.
All paths in this schema are relative to a dictionary containing image data for a component.
-
The path that points to a HTTP image URL for the image that the data is for. Maps to
URL
.Declaration
Objective-C
@property (readwrite, strong, nonatomic) id<HUBJSONURLPath> _Nonnull URLPath;
-
The path that points to a placeholder icon identifier. Maps to
placeholderIconIdentifier
.Declaration
Objective-C
@property (readwrite, strong, nonatomic) id<HUBJSONStringPath> _Nonnull placeholderIconIdentifierPath;
-
The path that points to the name of any local image to use. Maps to
localImage
.Declaration
Objective-C
@property (readwrite, strong, nonatomic) id<HUBJSONStringPath> _Nonnull localImageNamePath;
-
The path that points to any custo data for the image data object. Maps to
customData
.Declaration
Objective-C
@property (readwrite, strong, nonatomic) id<HUBJSONDictionaryPath> _Nonnull customDataPath;
-
Create a copy of this schema, with the same paths
Declaration
Objective-C
- (nonnull id<HUBComponentImageDataJSONSchema>)copy;