pod 'HandyJSON'

  • jsonString -> Model
        let jsonString = 19, "{\" age \ ": \" name \ ": \" Deng Yazhou \ ", \ "nickName \" : \ "dyz \", \ "age \" : 1}"
        if let model = JSONDeserializer<UserModel>.deserializeFrom(json: jsonString) {
            print(model)
        }
Copy the code

Subsequent updates