Dictionary

struct Dictionary<Key : Hashable, Value> : Collection, ExpressibleByDictionaryLiteral
  • Converts an instance of Dictionary whose values conform to JSONEncodable to JSON. The keys in the resulting JSON.dictionary will be of type String. - returns: An instance of JSON where the enum case is .dictionary.

    Declaration

    Swift

    public func toJSON() -> JSON

    Return Value

    An instance of JSON where the enum case is .dictionary.