@protocol HUBJSONCompatibleBuilder <NSObject>
Protocol defining the public API for adding JSON data to a Hub Framework model builder
Builders that support JSON data will conform to this protocol. Most builders only support Dictionary-based
JSON, except for
HUBViewModelBuilder that supports Array-based JSON for defining an array of body
Add binary JSON data to the builder
The builder will use its feature’s
HUBJSONSchemato parse the data that was added, and return any error that occured while doing so, or nil if the operation was completed successfully.
- (nullable NSError *)addJSONData:(nonnull NSData *)JSONData;
The JSON data to add
Add a JSON dictionary to this builder
The content that was extracted from the supplied dictionary will replace any previously defined content.
- (void)addDataFromJSONDictionary: (nonnull NSDictionary<NSString *, NSObject *> *)dictionary;
The JSON dictionary to extract content from