Skip to content

carabina/CleanJSON

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CleanJSON

CI Status Version Carthage compatible License Platform

在标准库源码基础上做了改动,以解决 JSONDecoder 各种解析失败的问题,如键值不存在,值为 null,类型不一致。

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • iOS 9.0+
  • Swift 4

Installation

CleanJSON is available through CocoaPods or Carthage. To install it, simply add the following line to your Podfile or Cartfile:

Podfile

pod 'CleanJSON'

Cartfile

githut "Pircate/CleanJSON"

Import

import CleanJSON

Usage

let decoder = CleanJSONDecoder()
try decoder.decode(Model.self, from: data)

Author

Pircate, [email protected]

License

CleanJSON is available under the MIT license. See the LICENSE file for more info.

About

Custom JSON decoder for Codable

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 98.8%
  • Ruby 1.2%