tristanhimmelman / ObjectMapper

Simple JSON Object mapping written in Swift
MIT License
9.14k stars 1.03k forks source link

Add Map extension for optional BaseMappable #1070

Closed limsangjin12 closed 5 years ago

limsangjin12 commented 5 years ago

For constants of optional type in ImmutableMappable.

class Item: ImmutableMappable {
  let optionalConst: SomeMappable?

  required init(map: Map) throws {
    optionalConst = map.value("key")
  }
}