Himotoki (紐解き) is a type-safe JSON decoding library written purely in Swift.

Related tags

JSON swift json decoding
Overview

Himotoki

Join the chat at https://gitter.im/ikesyo/Himotoki

GitHub release CI Status Carthage compatible Swift Package Manager

Himotoki (紐解き) is a type-safe JSON decoding library written purely in Swift. This library is highly inspired by the popular Swift JSON parsing libraries: Argo and ObjectMapper.

Himotoki has the same meaning of 'decoding' in Japanese.

  • Just do JSON decoding (deserialization) well. JSON encoding (serialization) will not be supported going forward. 😉
  • Much simpler API.
  • Fail-fast conditional model building. This is useful for some structs with non-optional let properties.
  • No external dependencies.

Let's take a look at a simple example:

struct Group: Himotoki.Decodable {
    let name: String
    let floor: Int
    let locationName: String
    let optional: [String]?

    // MARK: Himotoki.Decodable

    static func decode(_ e: Extractor) throws -> Group {
        return try Group(
            name: e <| "name",
            floor: e <| "floor",
            locationName: e <| [ "location", "name" ], // Parse nested objects
            optional: e <|? "optional" // Parse optional arrays of values
        )
    }
}

func testGroup() {
    var JSON: [String: AnyObject] = [ "name": "Himotoki", "floor": 12 ]
    
    let g = try? Group.decodeValue(JSON)
    XCTAssert(g != nil)
    XCTAssert(g?.name == "Himotoki")
    XCTAssert(g?.floor == 12)
    XCTAssert(g?.optional == nil)

    JSON["name"] = nil
    do {
        try Group.decodeValue(JSON)
    } catch let DecodeError.MissingKeyPath(keyPath) {
        XCTAssert(keyPath == "name")
    } catch {
        XCTFail()
    }
}

⚠️ Please note that you should need to add the module name Himotoki to Decodable (Himotoki.Decodable) to avoid type name collision with Foundation.Decodable in Xcode 9 or later. ⚠️

Implementing the decode method for your models

To implement the decode method for you models conforming to the Decodable protocol, you can use the following Extractor's extraction methods:

  • public func value(_ keyPath: KeyPath) throws -> T
  • public func valueOptional(_ keyPath: KeyPath) throws -> T?
  • public func array(_ keyPath: KeyPath) throws -> [T]
  • public func arrayOptional(_ keyPath: KeyPath) throws -> [T]?
  • public func dictionary(_ keyPath: KeyPath) throws -> [String: T]
  • public func dictionaryOptional(_ keyPath: KeyPath) throws -> [String: T]?

Extraction Operators

Himotoki also supports the following operators to decode JSON elements, where T is a generic type conforming to the Decodable protocol.

Operator Decode element as Remarks
<| T A value
<|? T? An optional value
<|| [T] An array of values
<||? [T]? An optional array of values
<|-| [String: T] A dictionary of values
<|-|? [String: T]? An optional dictionary of values

Value Transformation

You can transform an extracted value to an instance of non-Decodable types by passing the value to a Transformer instance as follows:

// Creates a `Transformer` instance.
let URLTransformer = Transformer<String, URL> { urlString throws -> URL in
    if let url = URL(string: urlString) {
        return url
    }
    
    throw customError("Invalid URL string: \(urlString)")
}

let url: URL = try URLTransformer.apply(e <| "foo_url")
let otherURLs: [URL] = try URLTransformer.apply(e <| "bar_urls")

Requirements

Himotoki 4.x requires / supports the following environments:

  • Swift 4.2 / Xcode 10.1 or later
  • OS X 10.9 or later
  • iOS 8.0 or later
  • tvOS 9.0 or later
  • watchOS 2.0 or later
  • Linux is also supported

Installation

Currently Himotoki supports installation via the package managers Carthage and CocoaPods.

Carthage

Himotoki is Carthage compatible.

  • Add github "ikesyo/Himotoki" ~> 3.1 to your Cartfile.
  • Run carthage update.

CocoaPods

Himotoki also can be used by CocoaPods.

  • Add the followings to your Podfile:

    3.1" ">
    use_frameworks!
    pod "Himotoki", "~> 3.1"
  • Run pod install.

License

Himotoki is released under the MIT License.

Comments
  • Fix crash with nil value in valueForPath

    Fix crash with nil value in valueForPath

    If you have object[first] = nil it will crash (fatal error: unexpectedly found nil while unwrapping an Optional value), as of left we have non-optional type. You should change AnyObject to optional or remove it (but it will raise warning)

    opened by Nikita2k 12
  • Fix perfomance issue caused by Dictionary's swift_dynamicCast

    Fix perfomance issue caused by Dictionary's swift_dynamicCast

    When I checked Himotoki's perfomance by JSONShootout with Himotoki, the result was very slow. It was very sad... 😢 so I inspect the issue and I found reason.

    It was caused by occured swift_dynamicCast by cast to [String: Any] in valueFor. So I fixed it to use NSDictionary for this cast, and the benchmark result changed very fast. 😄

    I want to review and merge this fix.

    2017-05-24 23 09 31
    opened by yudoufu 5
  • Foundation dependency

    Foundation dependency

    :+1: for this project! I'm going to add to my https://github.com/loretoparisi/ios-json-benchmark JSON comparison project. I have a question. In terms of pure swift language, using Apple's Foundation creates a dependency from Cocoa. Any way to get rid of it (no Cocoa dependencies at all). Thank you.

    opened by loretoparisi 5
  • Decoding array of arrays

    Decoding array of arrays

    Hi, I have an issue decoding array of arrays, how would you write a decode function which decode a JSON like this:

    "summary": {
      "items": [[0], [1], [2]]
    }
    

    I've tried writing a struct like this:

    struct Summary {
      let items: [[Int]]
    }
    

    and an extension:

    extension Summary: Decodable {
      static func decode(_ e: Extractor) throws -> Summary {
        return try Summary(items: e <|| "items")
      }
    }
    

    but I'm getting an error: Type '[Int]' does not conform to protocol 'Decodable'

    I know the JSON could be built better but this is what I'm getting from the server and this is what I have to decode.

    Thanks, Oron

    question 
    opened by oronbz 4
  • Implementing decode for a 2-D array

    Implementing decode for a 2-D array

    I have an object Song

    struct Song {
        ...
        let frequencies: [[Int]]
    }
    

    and right now I'm parsing it so:

    guard let arrayOfFrequencies = e.rawValue.valueForKeyPath("frequencies") as? [AnyObject] else {
        throw customError("frequency parsing failed")
    }       
    guard let twoD = arrayOfFrequencies.map({ $0 as? [Int] }) as? [[Int]] else {        
        throw customError("frequency parsing failed")
    }       
    

    Is this the way I should be decoding it? Can I use Himotoki to make my life easier?

    question 
    opened by AndrewSB 4
  • Using non final class Decodable

    Using non final class Decodable

    I have an issue since i last updated my pods and Himotoki got upgraded to 2.0.0.

    I no longer can use DecodedType and I have the following scenario I'd appreciate if you can help me fix.

    I am subclassing a class which I need to be decodable like such:

    class A: Decodable {
        var type : Int = 0
        var title: String = ""
    
        init (e: Extractor) {
            type = try! e <| "type"
            title = try! e <| "title"
        }
    
        static func decode(e: Extractor) throws -> A {
            let type : Int = try e <| "type"
            switch type {
            case 0:
                return B(e: e)
            case 1:
                return C(e: e)
            case 2:
                return A(e: e)
            }
        }
    }
    
    class B: A {
        var total : Double = 0.0
        override init(e: Extractor) {
            total = try! e <| "total"
            super.init(e: e)
        }
    }
    
    class C: A {
        var link : String = ""
        override init(e: Extractor) {
            link = try! e <| "link"
            super.init(e: e)
        }
    }
    

    I now have a compiler error on this line static func decode(e: Extractor) throws -> A which says Method 'decode' in non-final class 'A' must return 'Self' to conform to protocol 'Decodable'

    Thank you for your help in advance! Great library :+1: !

    question 
    opened by marcmatta 4
  • Unable to infer initializer's type of generic decodable type

    Unable to infer initializer's type of generic decodable type

    In generic decodable type, Swift can't infer the type of initializer. For example:

    struct PaginatedResponse<T: Decodable where T == T.DecodedType> {
        let id: Int
        let content: T
    
        static func decode(e: Extractor) -> PaginatedResponse? {
            let create = { PaginatedResponse($0) } // <- Missing argument for parameter 'content' in call
    
            return build(
                e <| "id",
                e <| "content"
            ).map(create)
        }
    }
    

    FYI, the code below passes build successfully.

    struct PaginatedResponse<T: Decodable where T == T.DecodedType> {
        let id: Int
        let content: T
    
        static func decode(e: Extractor) -> PaginatedResponse? {
            let create = { id, content in
                PaginatedResponse(id: id, content: content)
            }
    
            return build(
                e <| "id",
                e <| "content"
            ).map(create)
        }
    }
    

    Do you have any idea to infer the type of initializer in the regular way?

    question 
    opened by ishkawa 3
  • Why Class can not  decode by Himotoki?

    Why Class can not decode by Himotoki?

    Why Class in Swift can not decode by Himotoki? such as : class Hello: Decodable { var text: String? }

    static func decode(_ e: Extractor) throws -> UserModel { return try UserModel ( text : e <| "text", ) }

    question 
    opened by hjw6160602 2
  • Update README.md

    Update README.md

    Thank you so much for making Himotoki! I am using this library and think its Awesome so I wanted to make the README just a little more awesome!

    The original english is fine, but I thought I would phrase just a few sentences to sound a little more inviting, hopefully encouraging more developers to try this library!

    ~ Nick

    opened by Nirma 2
  • How best to extract raw dictionaries?

    How best to extract raw dictionaries?

    I have some JSON where one key path returns an Array<Dictionary<String,Any>>, that is an array of [String:Any] and I want to pass this to a Transformer for manipulation into a different structure.

    The issue I have is that Extractor's array and arrayOptional methods expect to return an array of Decodable T. I can see why this works for Transformer<String, URL> and the like thanks to the extensions in StandardLib.swift, but [String:Any] does not conform to Decodable.

    The only way I can get this to work is by adding an extension on Dictionary as follows:

    extension Dictionary: Decodable {
        public static func decode(_ e: Extractor) throws -> Dictionary<Key, Value> {
            return try castOrFail(e.rawValue)
        }
    }
    

    Is this correct? Should this be part of StandardLib.swift, or am I approaching this in the wrong way?

    opened by dcaunt 2
  • Linux support

    Linux support

    It unclear from the README.md if Himotoki runs on Linux.

    I have browsed around in the code and it mentions Linux several places.

    Perhaps make it more clear that Linux is supported.

    opened by neoneye 2
  • decoding a json with variable keys

    decoding a json with variable keys

    I am trying to decode a JSON like this one with Himotoki in Swift 3

    next: [
              {
                question: 'Fréquence',
                condition: { '==': ['answer', 'Actions'] },
              },
              {
                question: 'Fréquence',
                condition: { '>=': ['answer', 'Stop'] },
              },
              {
                question: 'Risque',
                condition: { '<=': ['answer', 'nul'] }
              }
            ]
    

    In the condition, there is an object that looks like a dictionary, since the field name changes ('==', '<=', '>=, ...). The value is then an array of string

    I have tried to decode like this

    typealias ConditionType = [String]
    
    extension ConditionType: Decodable {}
    
    struct NextItem {
        let question: String?
        let condition: [String : ConditionType]?
    }
    
    extension NextItem: Decodable {
        static func decode(_ e: Extractor) throws -> NextItem {
    
            return try NextItem(
                question:  e <|? "question",
                condition: e <|-|? "condition"
            )
        }
    }
    

    I do not not how to decode the ConditionType since there is no field name for the array

    opened by pdegouville 0
  • dyld: Library not loaded: @rpath/libswiftSwiftOnoneSupport.dylib

    dyld: Library not loaded: @rpath/libswiftSwiftOnoneSupport.dylib

    Maybe this is a rare case, but building inside xcworkspace ends-up with runtime crash. See: https://github.com/toshi0383/TVMLKitchen/issues/142 I confirmed this happens with Himotoki, too.

    I wonder if anybody have alternative work-around for this? Rather than adding ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES on library side?

    question 
    opened by toshi0383 5
Releases(4.0.0)
  • 4.0.0(Apr 2, 2019)

    This release supports Swift 4.2 / Xcode 10.1 or later.

    Breaking

    • CustomDebugStringConvertible is used now over CustomStringConvertible (#193)
    • Update Swift and Xcode (#197, #205, #206)
    • Remove now-unnecessary methods or operators thanks to Conditional Conformance (#198, #200, #201, #202, #203)
    Source code(tar.gz)
    Source code(zip)
  • 3.1.0(Jun 6, 2017)

    Fixed

    • Xcode 9 (Swift 3.2 / Swift 4.0) compatibility (#183)

    Improved

    • Performance improvements (#166, #169, #177). Thanks @yudoufu!
    • README fixes (#172, #173, #180, #182). Thanks @andrewh42, @Nirma and @yuta-t!.
    Source code(tar.gz)
    Source code(zip)
  • 3.0.1(Feb 22, 2017)

    Fixed

    • Fix an issue that Extractor.valueOptional(_:) and <|? operator are incorrectly throwing DecodeError.missingKeyPath(KeyPath) and that triggers Xcode's Swift Error Breakpoint unexpectedly (#162, #163).

    Improved

    • Deprecate ExpressibleByNilLiteral conformance on KeyPath (#165).
    Source code(tar.gz)
    Source code(zip)
  • 3.0.0(Sep 18, 2016)

    This release supports Swift 3.0 / Xcode 8.

    Breaking

    • Support Swift 3 and Linux (#145).
      • If you want the version which support Swift 2.2 (Xcode 7.3) or Swift 2.3 (Xcode 8), you can use the latest compatible version of 2.1.1 instead.
    • Remove obsolete AnyJSON typealias (#147). That is no longer needed in Swift 3, so use Any directly instead.
    Source code(tar.gz)
    Source code(zip)
  • 2.1.1(Jun 30, 2016)

    This release should support both Swift 2.2 / Xcode 7.3 and Swift 2.3 / Xcode 8.

    Fixed

    • Fix code signing on Xcode 8 for device builds (#130).
    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Jun 21, 2016)

    This release targets Swift 2.2 / Xcode 7.3.

    Added

    • Xcode 8 and Swift 2.3 compatibility (#126).
    • Make castOrFail function public to support class cluster for now (#118, #127, ec25bff).
    Source code(tar.gz)
    Source code(zip)
  • 2.0.1(Apr 25, 2016)

  • 2.0.0(Apr 12, 2016)

    This release targets Swift 2.2 / Xcode 7.3.

    Breaking

    • Remove DecodedType typealias (associatedtype) from Decodable protocol (#100). You can use required initializer or Transformer API for decoding non-final classes.
    • decode functions are unavailable in favor of decodeValue functions (#109).
    • Update DecodeError.TypeMismatch signature (#110). keyPath associated value is non-optional now. KeyPath.empty could be used instead of nil.
    • build functions are unavailable now (81df7c8).

    Added

    • Add some protocol extensions for Decodable (#111).
      • Decodable.decodeValue
      • [Decodable].decode
      • [String: Decodable].decode
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0-beta.3(Mar 29, 2016)

  • 2.0.0-beta.2(Mar 17, 2016)

    This release targets Swift 2.2 / Xcode 7.3.

    Breaking

    • decode functions are unavailable in favor of decodeValue functions (#109).
    • Update DecodeError.TypeMismatch signature (#110). keyPath associated value is non-optional now. KeyPath.empty could be used instead of nil.

    Added

    • Add some protocol extensions for Decodable (#111).
      • Decodable.decodeValue
      • [Decodable].decode
      • [String: Decodable].decode
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0-beta.1(Mar 14, 2016)

    This release targets Swift 2.2 / Xcode 7.3.

    Breaking

    • Remove DecodedType typealias (associatedtype) from Decodable protocol (#100). You can use required initializer or Transformer API for decoding non-final classes.
    Source code(tar.gz)
    Source code(zip)
  • 1.7.0(Mar 12, 2016)

    This release targets Swift 2.1 / Xcode 7.2.

    Added

    • Add KeyPath.empty (#105).
    • Add missing missingKeyPath func (#107).

    Improved

    • KeyPath is Hashable now (#103).
    • DecodeError is CustomStringConvertible now (#104).
    • KeyPath is NilLiteralConvertible now (#105).
    • DecodeError is Hashable now (#106).
    Source code(tar.gz)
    Source code(zip)
  • 1.6.0(Mar 6, 2016)

    This release targets Swift 2.1 / Xcode 7.2.

    Added

    • Add DecodeError.Custom case (#92).
    • Add Transformer for value transformaion API (#93).
    • Rename decode functions to decodeValue (#96). decode functions still exist to keep backward compatibility but are deprecated.
    • Add AnyJSON typealias for supporting Any type on Linux (#98).

    Improved

    • Minor improvement for decodeDictionary (#95).
    Source code(tar.gz)
    Source code(zip)
  • 1.5.0(Feb 20, 2016)

    This release targets Swift 2.1 / Xcode 7.2.

    Added

    • Deprecate build functions (#86).
    • Support building on Linux (#88).

    Improved

    • Avoid curried function syntax (#87).

    Fixed

    • Fix incorrect .MissingKeyPath error handling (#89).
    Source code(tar.gz)
    Source code(zip)
  • 1.4.0(Jan 20, 2016)

  • 1.3.2(Dec 15, 2015)

    This release targets Swift 2.1 / Xcode 7.2.

    Improved

    • Avoid var binding which will be removed in Swift 3.0 (#74).
    • Change directory structure for Swift Package Manager (SwiftPM) support (#76).

    Fixed

    • Setting explicit deployment target to watchOS 2.0 in Xcode 7.2 (#77).
    Source code(tar.gz)
    Source code(zip)
  • 1.3.1(Nov 30, 2015)

    This release targets Swift 2.1 / Xcode 7.1.

    Improved

    • Refactor DecodeError.TypeMismatch, improve the message for RawRepresentable (#68).

    Fixed

    • Fix a crash on nested object parsing when a nested object is not a dictionary (#71). Thanks @nakiwo for the bug report!
    Source code(tar.gz)
    Source code(zip)
  • 1.3.0(Nov 13, 2015)

  • 1.2.0(Nov 12, 2015)

    This release targets Swift 2.0 / Xcode 7.0.

    Added

    • Implement decode() overloads which takes a root KeyPath (#61).

    Improved

    • Add Operators section to README (#59). Thanks @yoichitgy!
    • Enable Whole Module Optimization for Swift 2 (33a8ec8).
    Source code(tar.gz)
    Source code(zip)
  • 1.1.2(Oct 21, 2015)

    This release targets Swift 2.0 / Xcode 7.0.

    Bug fixes

    • Disable bitcode for Mac target (#55)
    • Fix propagation of DecodeError.MissingKeyPath from decode(e: Extractor) (#56)
    Source code(tar.gz)
    Source code(zip)
  • 1.1.1(Oct 20, 2015)

  • 1.1.0(Oct 15, 2015)

    This release targets Swift 2.0 / Xcode 7.0.

    Enhancements

    • Extractor and KeyPath now conform to CustomStringConvertible (#46, #47)
    • Implement RawRepresentable support (#50)
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Sep 24, 2015)

    This release targets Swift 2.0 / Xcode 7.0.

    Breaking changes

    • #31 Introduce error handling model. The signatures of decode functions / methods and operators for Extractor are changed to use throws with DecodeError and return non-optional value, as something like:
      • Decodable: static func decode(e: Extractor) throws -> DecodedType
      • func decode<T>(object: AnyObject) throws -> T
      • func <| <T>(e: Extractor, keyPath: KeyPath) throws -> T

    Enhancements

    • #24 Add watchOS target.
    • KeyPath now conforms to Equatable.
    Source code(tar.gz)
    Source code(zip)
  • 0.6.3(Sep 15, 2015)

  • 0.6.2(Sep 12, 2015)

    This release contains a performance improvement, it is recommended to upgrade to the release!

    Enhancements

    • #34 Avoid casting to [String: AnyObject] dictionary for performance improvement.
    Source code(tar.gz)
    Source code(zip)
  • 0.6.1(Sep 4, 2015)

    This release contains a huge performance improvement, it is strongly recommended to upgrade to the release!

    Bug fixes

    • #32 Fix performance penalty in Extractor.

    Enhancements

    • #32 Improve decodeArray() performance.
    Source code(tar.gz)
    Source code(zip)
  • 0.6.0(Aug 30, 2015)

    Breaking changes

    • #29 Refine build() functions signature. This would make it easy for the compiler to infer the parameters' type. You should now use build() as follows (from README):

      let create = { Group($0) }
      return build(create)(
          e <| "name",
          e <| "floor",
          e <| [ "location", "name" ],
          e <||? "optional"
      )
      
    Source code(tar.gz)
    Source code(zip)
  • 0.5.2(Aug 6, 2015)

    Enhancements

    • #26 Make Extractor conform to Decodable.

      You can now use a Extractor's rawValue as follows:

       (e <| "raw_value").map { (e: Extractor) in e.rawValue }
      
    Source code(tar.gz)
    Source code(zip)
  • 0.5.1(Jul 2, 2015)

  • 0.5(Jun 30, 2015)

    Breaking changes

    • #17 Rename some decode functions. This change is for better readability, understandability, and ease of type inference.
      • decode() -> [T]? is now decodeArray().
      • decode() -> [String: T]? is now decodeDictionary().
    Source code(tar.gz)
    Source code(zip)
Owner
IKEDA Sho
IKEDA Sho
Implement dynamic JSON decoding within the constraints of Swift's sound type system by working on top of Swift's Codable implementations.

DynamicCodableKit DynamicCodableKit helps you to implement dynamic JSON decoding within the constraints of Swift's sound type system by working on top

SwiftyLab 15 Oct 16, 2022
🧱 A JSON decoding/encoding library that handles optimistically or strictly.

Do you need to handle the root cause of failure in decoding JSON? We often process the value as a default value if it could not be decoded from JSON.

Muukii 252 Oct 28, 2022
Argo is a library that lets you extract models from JSON or similar structures in a way that's concise, type-safe, and easy to extend

Argo is a library that lets you extract models from JSON or similar structures in a way that's concise, type-safe, and easy to extend. Using Argo

thoughtbot, inc. 3.5k Dec 20, 2022
Hassle-free JSON encoding and decoding in Swift

#JSONCodable Hassle-free JSON encoding and decoding in Swift Installation Simply add the following to your Cartfile and run carthage update: github "m

Matthew Cheok 605 Jun 29, 2022
Nikolai Saganenko 1 Jan 9, 2022
JSEN (JSON Swift Enum Notation) is a lightweight enum representation of a JSON, written in Swift.

JSEN /ˈdʒeɪsən/ JAY-sən JSEN (JSON Swift Enum Notation) is a lightweight enum representation of a JSON, written in Swift. A JSON, as defined in the EC

Roger Oba 8 Nov 22, 2022
A protocol to serialize Swift structs and classes for encoding and decoding.

Serpent (previously known as Serializable) is a framework made for creating model objects or structs that can be easily serialized and deserialized fr

Nodes - iOS 287 Nov 11, 2022
Swift-json - High-performance json parsing in swift

json 0.1.4 swift-json is a pure-Swift JSON parsing library designed for high-per

kelvin 43 Dec 15, 2022
JSON-Practice - JSON Practice With Swift

JSON Practice Vista creada con: Programmatic + AutoLayout Breve explicación de l

Vanesa Giselle Korbenfeld 0 Oct 29, 2021
Ss-json - High-performance json parsing in swift

json 0.1.1 swift-json is a pure-Swift JSON parsing library designed for high-per

kelvin 43 Dec 15, 2022
Swift parser for JSON Feed — a new format similar to RSS and Atom but in JSON.

JSONFeed Swift parser for JSON Feed — a new format similar to RSS and Atom but in JSON. For more information about this new feed format visit: https:/

Toto Tvalavadze 31 Nov 22, 2021
JSONNeverDie - Auto reflection tool from JSON to Model, user friendly JSON encoder / decoder, aims to never die

JSONNeverDie is an auto reflection tool from JSON to Model, a user friendly JSON encoder / decoder, aims to never die. Also JSONNeverDie is a very important part of Pitaya.

John Lui 454 Oct 30, 2022
HandyJSON is a framework written in Swift which to make converting model objects to and from JSON easy on iOS.

HandyJSON To deal with crash on iOS 14 beta4 please try version 5.0.3-beta HandyJSON is a framework written in Swift which to make converting model ob

Alibaba 4.1k Dec 29, 2022
JASON is a faster JSON deserializer written in Swift.

JASON is a faster JSON deserializer written in Swift. JASON is the best framework we found to manage JSON at Swapcard. This is by far the fastest and

Damien 1k Oct 15, 2022
ObjectMapper is a framework written in Swift that makes it easy for you to convert your model objects to and from JSON.

ObjectMapper is a framework written in Swift that makes it easy for you to convert your model objects (classes and structs) to and from J

Tristan Himmelman 9k Jan 2, 2023
An extremely simple JSON helper written in Swift.

Alexander Alexander is an extremely simple JSON helper written in Swift. It brings type safety and Foundation helpers to the cumbersome task of JSON u

HODINKEE 36 Sep 15, 2022
Simple JSON Object mapping written in Swift

ObjectMapper ObjectMapper is a framework written in Swift that makes it easy for you to convert your model objects (classes and structs) to and from J

Tristan Himmelman 9k Jan 2, 2023
An iOS framework for creating JSON-based models. Written in Swift.

An iOS framework for creating JSON-based models. Written in Swift (because it totally rules!) Requirements iOS 8.0+ Xcode 7.3 Swift 2.2 Installation E

Oven Bits 448 Nov 8, 2022
A JSON parser with concise API written in Swift.

A JSON parser with concise API written in Swift Maps JSON attributes to different Swift types with just two methods: map and mapArrayOfObjects. The li

Evgenii Neumerzhitckii 14 Aug 13, 2018