CBLMutableDictionary

CBLMutableDictionary is a mutable version of the CBLDictionary.

Initializers

  • Creates a new empty CBLMutableDictionary object.

    Declaration

    Objective-C

    + (nonnull instancetype)dictionary;
  • Initialize a new empty CBLMutableDictionary object.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Initialzes a new CBLMutableDictionary object with data. Allowed value types are CBLArray, CBLBlob, CBLDictionary, NSArray, NSDate, NSDictionary, NSNumber, NSNull, and NSString. The NSArrays and NSDictionaries must contain only the above types.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithData:
        (nonnull NSDictionary<NSString *, id> *)data;

    Parameters

    data

    The data.

  • Initialzes a new CBLMutableDictionary object from the JSON string.

    Declaration

    Objective-C

    - (nullable instancetype)initWithJSON:(nonnull NSString *)json
                                    error:(NSError *_Nullable *_Nullable)error;

    Parameters

    json

    The JSON string with data.

    error

    On return, the error if any.

    Return Value

    The CBLMutableDictionary object, nil in case of JSON Error .