AWSMTLJSONSerializing
Objective-C
@protocol AWSMTLJSONSerializing
@required
// Specifies how to map property keys to different key paths in JSON.
//
// Subclasses overriding this method should combine their values with those of
// `super`.
//
// Any property keys not present in the dictionary are assumed to match the JSON
// key that should be used. Any keys associated with NSNull will not participate
// in JSON serialization.
//
// Returns a dictionary mapping property keys to JSON key paths (as strings) or
// NSNull values.
+ (NSDictionary *)JSONKeyPathsByPropertyKey;
@optional
// Specifies how to convert a JSON value to the given property key. If
// reversible, the transformer will also be used to convert the property value
// back to JSON.
//
// If the receiver implements a `+<key>JSONTransformer` method, MTLJSONAdapter
// will use the result of that method instead.
//
// Returns a value transformer, or nil if no transformation should be performed.
+ (NSValueTransformer *)JSONTransformerForKey:(NSString *)key;
// Overridden to parse the receiver as a different class, based on information
// in the provided dictionary.
//
// This is mostly useful for class clusters, where the abstract base class would
// be passed into -[MTLJSONAdapter initWithJSONDictionary:modelClass:], but
// a subclass should be instantiated instead.
//
// JSONDictionary - The JSON dictionary that will be parsed.
//
// Returns the class that should be parsed (which may be the receiver), or nil
// to abort parsing (e.g., if the data is invalid).
+ (Class)classForParsingJSONDictionary:(NSDictionary *)JSONDictionary;
@end
Swift
protocol AWSMTLJSONSerializing
Undocumented
-
Undocumented
Declaration
Objective-C
+ (NSDictionary *)JSONKeyPathsByPropertyKey;
Swift
static func jsonKeyPathsByPropertyKey() -> [AnyHashable : Any]!
-
Undocumented
Declaration
Objective-C
+ (NSValueTransformer *)JSONTransformerForKey:(NSString *)key;
Swift
optional static func jsonTransformer(forKey key: String!) -> ValueTransformer!
-
Undocumented
Declaration
Objective-C
+ (Class)classForParsingJSONDictionary:(NSDictionary *)JSONDictionary;
Swift
optional static func `class`(forParsingJSONDictionary JSONDictionary: [AnyHashable : Any]!) -> AnyClass!