Classes

The following classes are available globally.

  • Transforms a String to a URL using its URL(string:String) when getting value from a map. Transforms a URL back to a String using its absoluteString variable when adding it to a map.

    See more

    Declaration

    Swift

    public class URLCoder : MapCoder
  • Map

    A wrapper around a JSON object that conveniently returns parsed objects or adds complex objects into the JSON object.

    Basic example of returning objects:

    let jsonString = // Source of JSON string
    let map = Map(jsonString: jsonString, encoding: .utf8)
    
    let string: String = try map.value("some_key")
    

    Basic example of adding objects:

    let map = Map()
    map.add("some string", for: "some_key")
    let jsonString = map.jsonString(encoding: .utf8)
    
    See more

    Declaration

    Swift

    public class Map