VaultMobileSDK  18R3
iOS framework for Vault API
Instance Methods | Properties | List of all members
VEVVaultJSONField Class Reference

Instances of this class are associated with a specific key/value pair from a Vault response schema, e.g., the name__v key from the JSON schema used by the documents endpoint. It is used to specify which keys are searchable when creating a VEVVaultJSONCache. All such keys must exist at the top level of the JSON schema. The type property must correspond the appropriate JSON type in the JSON schema. More...

Inherits NSObject.

Instance Methods

(instancetype) - init:type:
 Initializes a VEVField object with a key name and type. More...
 
(id) - parse:
 Returns the value for the JSON response that matches key fieldName. Only top level JSON keys are searched. Create a subclass and override this method if the field value is a collection or if the key/value pair is nested further down from the top level. More...
 

Properties

NSString * fieldName
 The name of the key from the JSON schema.
 
VEVFieldType type
 The type associated with the field in the Vault response.
 

Detailed Description

Instances of this class are associated with a specific key/value pair from a Vault response schema, e.g., the name__v key from the JSON schema used by the documents endpoint. It is used to specify which keys are searchable when creating a VEVVaultJSONCache. All such keys must exist at the top level of the JSON schema. The type property must correspond the appropriate JSON type in the JSON schema.

Method Documentation

◆ init:type:()

- (instancetype) init: (NSString *)  fieldName
type: (VEVFieldType type 

Initializes a VEVField object with a key name and type.

Parameters
fieldNameThe name of the key as it exists in a Vault response JSON schema.
typeThe VEVFieldType of the value stored that matches the corresponding JSON schema type, e.g. VEVFieldTypeInteger -> JSON number.

◆ parse:()

- (id) parse: (NSDictionary *)  json

Returns the value for the JSON response that matches key fieldName. Only top level JSON keys are searched. Create a subclass and override this method if the field value is a collection or if the key/value pair is nested further down from the top level.

Parameters
jsonAn NSDictionary representation of a JSON response originating from a Vault API endpoint.

The documentation for this class was generated from the following file: