An iOS framework for creating JSON-based models. Written in Swift.

Related tags

JSON ModelRocket
Overview

ModelRocket

Build Status Carthage compatible CocoaPods Compatible License Platform

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

Embedded frameworks require a minimum deployment target of iOS 8

Carthage

Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.

You can install Carthage with Homebrew using the following commands:

$ brew update
$ brew install carthage

To integrate ModelRocket into your Xcode project using Carthage, specify it in your Cartfile:

github "ovenbits/ModelRocket"

Then, run carthage update.

Follow the current instructions in Carthage's README for up-to-date installation instructions.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.

CocoaPods 0.36 adds supports for Swift and embedded frameworks. You can install it with the following command:

$ gem install cocoapods

To integrate ModelRocket into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'ModelRocket'

Then, run pod install.

Swift Package Manager

The Swift Package Manager is a dependency management tool provided by Apple, still in early design and development. For more infomation check out its GitHub Page.

You can use the Swift Package Manager to install ModelRocket by adding it as a dependency in your Package.swift file:

import PackageDescription

let package = Package(
    name: "PROJECT_NAME",
    targets: [],
    dependencies: [
        .Package(url: "https://github.com/ovenbits/ModelRocket.git", versions: "1.2.3" ..< Version.max)
    ]
)

Usage

Creating a custom object

class Vehicle: Model {
	let make  = Property<String>(key: "make")
	let model = Property<String>(key: "model", required: true)
	let year  = Property<Int>(key: "year") { year in
		if year < 2015 {
			// offer discount
		}
	}
	let color = Property<UIColor>(key: "color", defaultValue: UIColor.blackColor())
}

NOTE: As with all Swift variables, let should always be used, unless var is absolutely needed. In the case of Model objects, let should be used for all Property[Array|Dictionary] properties, as it still allows the underlying value to be changed, unless you truly need to reassign the property

Supported Types

  • String
  • Bool
  • Int
  • UInt
  • Double
  • Float

In addition to the core types above, ModelRocket also supports serialization for several other classes out of the box:

  • NSDate — ISO8601-formatted string (2015-05-31T19:00:17.000+0000)
  • UIColor — hex-color string (#f6c500)
  • NSURL — any url string (http://ovenbits.com)
  • NSNumber — any number, can be used in place of Double, Float, Int, and UInt

Creating an object with a typed array

// `Model` subclasses get `fromJSON` and `toJSON` implementations on `JSONTransformable` for free,
// but explicit `JSONTransformable` conformance is still required
extension Vehicle: JSONTransformable {}

class Vehicles: Model {
    let vehicles = PropertyArray<Vehicle>(key: "vehicles")
}

PropertyArray conforms to CollectionType, therefore, the .values syntax is not necessary when iterating through the values. For example:

let allVehicles = Vehicles(json: <json>)

// using `.values` syntax
for vehicle in allVehicles.vehicles.values {
}

// using `CollectionType` conformance
for vehicle in allVehicles.vehicles {
}

Creating an object with a typed dictionary

class Car: Vehicle {
	let purchasedTrims = PropertyDictionary<Int>(key: "purchased_trims")
}

PropertyDictionary conforms to CollectionType, therefore, the .values syntax is not necessary when iterating through the keys and values. For example:

let vehicle = Vehicle(json: <json>)

// using `.values` syntax
for (key, trim) in vehicle.purchasedTrims.values {
}

// using `CollectionType` conformance
for (key, trim) in vehicle.purchasedTrims {
}

NOTE: All object in the dictionary must be of the same type. If they're not, the app won't crash, but values of different types will be discarded

Initializing and using a custom object

// instantiate object
let vehicle = Vehicle(json: json)

// get property type
println("Vehicle make property has type: \(vehicle.make.type)")

// get property value
if let make = vehicle.make.value {
	println("Vehicle make: \(make)")
}

Model objects also contain a failable initializer, which will only return an initialized object if all properties marked as required = true are non-nil.

// instantiate object, only if `json` contains a value for the `make` property
if let vehicle = Vehicle(strictJSON: json) {
	// it's best to avoid implicitly unwrapped optionals, however, since `vehicle` is initialized iff `make` is non-nil, if can be force-unwrapped safely here
	println("Vehicle make: \(vehicle.make.value!)")
}
else {
	pintln("Invalid JSON")
}

Subclassing a custom object

class Car: Vehicle {
    let numberOfDoors = Property<Int>(key: "number_of_doors")
}

Adding a custom object as a property of another object

The custom object must conform to the JSONTransformable protocol by defining the following variables/functions

  • class func fromJSON(json: JSON) -> T?
  • func toJSON() -> AnyObject
class Vehicle: Model {
	let manufacturer = Property<Manufacturer>(key: "manufacturer")
}

class Manufacturer: Model {
    let companyName = Property<String>(key: "company_name")
    let headquarters = Property<String>(key: "headquarters")
    let founded = Property<NSDate>(key: "founded")
}

extension Manufacturer: JSONTransformable {
    class func fromJSON(json: JSON) -> Manufacturer? {
        return Manufacturer(json: json)
    }
    func toJSON() -> AnyObject {
        return self.json().dictionary
    }
}

Using an enum as a property

ModelRocket supports enum types for Property[Array|Dictionary] properties, as long as the enum conforms to the JSONTransformable protocol.

As a simple example, the material type of a vehicle's interior could use an enum like this:

enum VehicleInterior: String {
    case Fabric = "fabric"
    case Leather = "leather"
}

extension VehicleInterior: JSONTransformable {
    static func fromJSON(json: JSON) -> VehicleInterior? {
        return VehicleInterior(rawValue: json.stringValue)
    }
    func toJSON() -> AnyObject {
        return rawValue
    }
}

class Vehicle: ModelRocket {
   let interior = Property<VehicleInterior>(key: "interior")
}

Property postProcess hook

The Property postProcess closure (also available on PropertyArray and PropertyDictionary) provides a mechanism for work to be done after all properties of a Model object have been initialized from JSON but before the Model object has finished initializing.

class Vehicles: Model {
    let vehicles = PropertyArray<Vehicle>(key: "vehicles") { (values) -> Void in
        for vehicle in values {
            println("postHook vehicle: \(vehicle.make.value!)")
        }
    }
}

.value accessor usage pattern

A ModelRocket property is of type Property<T>. When accessing the property's value, you go through Property.value, e.g.:

let vehicleMake = make.value

It is perfectly acceptable to to utilize Propertys and access the property value directly. However, you may want a different public API for your model objects.

private let _make = Property<String>(key: "make")
public var make: String {
  get {
    return make.value ?? "unknown make"
  }
  set {
    make.value = newValue
  }
}

This usage pattern enables:

  • A cleaner public API
  • A public API that makes the type more proper: we expect "make" to be a string, not a Property
  • value is optional because it must be for general applicability, but your API may be more correct to have non-optional. Of course, if your API wants an optional, that's fine too.
  • The ability to process or convert the raw JSON value to other values more proper to your object's public API
  • Whereas a Property.value could be set, you could omit the set accessor for a read-only property, again helping to expose exactly the API for your object that you desire.
  • This usage of the bridge pattern enables ModelRocket to become an implementation detail and minimize dependencies and long-term maintenance.

Implementing a class cluster

Override the modelForJSON(json: JSON) -> Model function

class Vehicle: Model {
    let make = Property<String>(key: "make")
    let model = Property<String>(key: "model")
    let year = Property<Int>(key: "year")
    let color = Property<UIColor>(key: "color")
    let manufacturer = Property<Manufacturer>(key: "manufacturer")
    
    override class func modelForJSON(json: JSON) -> Vehicle {
        
        switch json["type"].stringValue {
        case "car":
            return Car(json: json)
        case "plane":
            return Plane(json: json)
        case "bike":
            return Bike(json: json)
        default:
            return Vehicle(json: json)
        }
    }
}

Then to access subclass-specific properties, use a switch-case

let vehicle = Vehicle.modelForJSON(vehicleJSON)
                
switch vehicle {
case let car as Car:
	// drive the car
case let plane as Plane:
	// fly the plane
case let bike as Bike:
	// ride the bike
default:
	// do nothing
}

Obtaining the object's JSON representation

Calling the json() function on a Model subclass returns a tuple containing:

  • dictionary: [String : AnyObject]
  • json: JSON
  • data: NSData

Obtaining a copy of a custom object

Call copy() on the object, and cast to the correct type. Example:

let vehicleCopy = vehicle.copy() as! Vehicle

License

ModelRocket is released under the MIT license. See LICENSE for details.

Comments
  • Add ability to check for `null` in JSON with `is NSNull`.

    Add ability to check for `null` in JSON with `is NSNull`.

    The inability for us to check if a key exists, but is null, in the JSON was kind of a bummer, so I wrote this up.

    Note that this is different for checking if a key doesn't exist, which is where you'd use json["not_a_key"].isNil. Instead, if you have an object in the JSON as such…

    {
        "can_be_null": null
    }
    

    Then you check if that object is null using the change in this PR by asking

    json["can_be_null"].isNull // returns true
    json["can_be_null"].isNil // returns false, because the key is there, but is not nil; it's null
    

    This PR comes complete with unit test addition!

    opened by kreeger 8
  • Extended JSON to RawRepresentable protocol

    Extended JSON to RawRepresentable protocol

    This provides anyone using this library as a simple JSON parser the ability grab the object property directly from a JSON instance. The setter is still private.

    opened by jlalvarez18 3
  • Internal property description clash when overriding

    Internal property description clash when overriding

    Hello all! Nice library :)

    Can't use let description = PropertyArray<String>(key: "description")

        "description": [
            "4 claras de huevo revueltas con ½ taza de espinaca y ½ taza de champiñones",
            "1 tortilla de maíz",
            "½ toronja"
          ]
    

    I know, is a collection of ingredients and it should be named different. Anyhow, in the case that something really need the name description, like in a blogpost ?

    Saludos

    opened by argentounce 3
  • Ask ModelRocket's failable init to return nil when JSON is nil.

    Ask ModelRocket's failable init to return nil when JSON is nil.

    I've tried just about every other permutation of ModelRocket(strictJSON:) that I could, and maybe I'm using it wrong, but I've got a dilemma around optional JSON nodes that map to other ModelRocket subclasses. Basically, the child property object gets initialized, even if there is no node for it.

    I've got two models: a Document and a Category.

    class Document: ModelRocket {
        var category: Category? {
            return _category.value
        }
        private let _category = Property<Category>(key: "category")
    
        var categoryIdentifier: String? {
            return category?.identifier
        }
    }
    
    class Category: ModelRocket {
        var identifier: String! {
            return _identifier.value!
        }
        private let _identifier = Property<String>(key: "id")
    }
    

    A Document's Category is optional, but a Category's identifier is required (provided the category exists).

    If I pass in JSON like this…

    [
      { "document": {
          "category": {
              "id": "1-category"
          }
        },
      }
      { "document": { } }
    ]
    

    For what it's worth, these is my JSONTransformable extensions for each.

    extension Document: JSONTransformable {
        typealias T = Document
    
        static func fromJSON(json: JSON) -> Document? {
            return Document(strictJSON: json)
        }
    
        func toJSON() -> AnyObject {
            return self.json().dictionary
        }
    }
    
    extension Category: JSONTransformable {
        typealias T = Category
    
        static func fromJSON(json: JSON) -> Category? {
            return Category(strictJSON: json)
        }
    
        func toJSON() -> AnyObject {
            return self.json().dictionary
        }
    }
    

    The first Document gets created with a Category just fine, and the document's categoryIdentifier property is a-ok. The second Document gets created, but when I hit categoryIdentifier, I expect to get nil back; instead, I get a fatal error: unexpectedly found nil while unwrapping an Optional value crash, inside of the Category's identifier property. The Category object should never have been created if there was no "category" node in the JSON.

    This pull request slightly modifies the strictJSON-based fail-able initializer so that if the json passed in is nil, then the object returned is also nil. It's only after I make this change that everything initializes (or doesn't) like I expect it to.

    opened by kreeger 3
  • ModelRocket's performance

    ModelRocket's performance

    Hi,

    I was wondering about ModelRocket's performance compared to a few other popular JSON mapper libraries: https://github.com/bwhiteley/JSONShootout

    However, due to the way of creating the class variables (e.g. let title = Property(key: "title"), I'm not sure how I can add ModelRocket to do a comparison.

    Looks like I will need to write an extension on these classes and member values:

    • ModelObjects/Program.swift
    • ModelObjects/Recording.swift

    Any suggestions?

    opened by falcon4ever 2
  • Nested JSON

    Nested JSON

    It would be great to see a couple more example in the Readme. I am looking to create model for the following JSON:

    "pricing": {
            "USD": {
                "price": 42
            },
            "CAD": {
                "price": 60
            },
            "MXN": {
                "price": 510
            },
    
        }
    

    the currency codes are not predictable. Can be anything.

    opened by oscarmorrison 2
  • Add check for null value using hasValue; rename isNil to hasKey.

    Add check for null value using hasValue; rename isNil to hasKey.

    This pull request supersedes #8 and more or less continues the discussion from there.

    The ability for us to check if a key exists is written as !isNil, but no check currently exists for when the key is present, but the resulting value is nil (when deserialized using NSJSONSerialization, these are brought into the object as NSNull).

    What this PR does is allow JSON to respond to .hasKey and .hasValue (the former being a newly-revised version of isNil, the latter checking for object is NSNull). So now, if you have an object in the JSON as such…

    {
        "can_be_null": null
    }
    

    Then you check if that object is null using the change in this PR by asking

    json["can_be_null"].hasKey // returns true
    json["can_be_null"].hasValue // returns false
    
    // Additionally...
    json["not_a_key"].hasKey // returns false
    json["not_a_key"].hasValue // returns false
    

    This PR comes complete with unit test addition!

    opened by kreeger 2
  • Typed array models don't work as documented

    Typed array models don't work as documented

    According to the examples in the readme, this is how you create a typed array model:

    class Vehicle: Model {
        let make  = Property<String>(key: "make")
        let model = Property<String>(key: "model", required: true)
        let year  = Property<Int>(key: "year") { year in
            if year < 2015 {
                // offer discount
            }
        }
        let color = Property<UIColor>(key: "color", defaultValue: UIColor.blackColor())
    }
    
    class Vehicles: Model {
        let vehicles = PropertyArray<Vehicle>(key: "vehicles")
    }
    
    

    However, this results in error "Type 'Vehicle' does not conform to protocol 'JSONTransformable'

    Adding the "JSONTransformable" protocol to Vehicle fixes the issue.

    opened by thatjuan 1
  • Unexpected type required property

    Unexpected type required property

    JSON

    { "model": 15 } // This should be a string, but due to a server side bug, this is now an int.
    

    Swift

    class Vehicle: Model {
        let model = Property<String>(key: "model", required: true)
    }
    

    Expected behavior Since "model" is not of type String, but of type Int, I expect the the model property to become nil and since model is required I expect the vehicle object not to be initialized.

    Behaviour The vehicle object is initialized while the model property is nil. This causes a crash when I unwrap the model property: print("Vehicle make: \(vehicle.make.value!)")

    opened by pimnijman 1
  • Any samples of using this with Alamofire?

    Any samples of using this with Alamofire?

    I like the syntax of this lib better then Argo's, however, I am not sure how to use this with Alamofire (3.0)? Do you have any suggestions? I've been trying to use the json 'response' data to fill out my ModelRocket models.

    Nevermind, figured it out:

    Alamofire.request(.GET, "https://httpbin.org/get", parameters: ["foo": "bar"])
                .responseJSON { response in
    
                    let jsonData: NSData = response.data!
                    let json = JSON(data: jsonData)
    
                    if let test = Test(strictJSON: json) {
                        if let url = test.url.value {
                            print("url: \(url)")
                        }
    
                        if let origin = test.url.value {
                            print("origin: \(origin)")
                        }
                    }
            }
    
    class Test: Model {
        let origin  = Property<String>(key: "origin")
        let url  = Property<String>(key: "url")
    }
    
    opened by falcon4ever 1
  • JSONTransformableDateFormatter doesn't transform dates properly

    JSONTransformableDateFormatter doesn't transform dates properly

    The current NSDateFormatter for transforming ISO8601 appears to have some issues with regards to the date format:

    dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"

    First putting the 'Z' in single quotes seems to escape it so that it always assumes the date string is in GMT therefore ignoring timezone offset included in the string.

    For example if I use ModelRocket to parse the following date string from my JSON: "2015-10-04T01:00:00.000Z"

    I actually end up with: "2015-10-04T05:00:00.000Z"

    This is because by default NSDateFormatter uses the local timezone of the device (in my case EST) so when this combines with the escaped Z the time is off by 4 hours.

    This can be corrected by eliminating the single quotes around the Z so it accepts the offsets properly.

    Additionally having the SSS means that the example string 2015-05-31T19:00:17+00:00 from the documentation will fail to parse because its missing milliseconds.

    The last thing is that its recommended to add the following just in case the device is not using the gregorian calendar:

    formatter.locale = NSLocale(localeIdentifier: "en_US_POSIX")

    https://github.com/ovenbits/ModelRocket/blob/866b1a714ffd86f40b290a4e032be87376529c05/ModelRocket/JSONTransformable.swift#L83

    opened by tomparkp 1
Releases(1.3)
  • 1.2.4(Feb 13, 2016)

    Added

    • RawRepresentable conformance to JSON
      • This includes a failable initializer with a single AnyObject argument and a compute property named rawValue of type AnyObject
    • Function for converting a JSON object back to raw NSData
    do {
       let data = try json.rawData(.PrettyPrinted)
       // do something with data
    } 
    catch let error = JSON.DataError {}
    catch {}
    
    
    Source code(tar.gz)
    Source code(zip)
    ModelRocket.framework.zip(2.58 MB)
  • 1.2.3(Jan 20, 2016)

  • 1.2.2(Nov 18, 2015)

    Updated

    • Built-in date formatter to accept non-GMT date formats. ISO8601 formatting (yyyy-MM-dd'T'HH:mm:ss.SSSZ) is still required, but a future release will contain support for more formats. In the meantime, you can use this pattern if your models require a different format:
    private let dateFormatter = {
       let formatter = NSDateFormatter()
       formatter.format = "yyyy-MM-dd"
       return formatter
    }()
    
    private let _date = Property<String>(key: "date")
    public var date: NSDate? {
       guard let date = _date.value else { return nil }
       return dateFormatter.dateFromString(date)
    }
    

    Fixed

    • Issue where time zones weren't respected while parsing JSON to/from NSDate objects
    Source code(tar.gz)
    Source code(zip)
  • 1.2.1(Oct 29, 2015)

    Fixed

    • An issue with the default implementation of fromJSON for Model types. The implementation worked without issue in simulator builds, but caused crashing on device builds. Attempting to access the dynamicType on Self currently causes problems on device builds, so dynamicType is no longer used; however, fromJSON can still be overridden in the subclass if needed.

    Updated

    • The convenience initializers on Model are now designated initializers. This allows these initializers to be overridden in subclasses.
    Source code(tar.gz)
    Source code(zip)
  • 1.2(Oct 27, 2015)

    Added

    • hasValue and hasKey to JSON (replaces isNil). The behavior of isNil was not always clear, in cases where the JSON contained a valid key but a null value. hasValue and hasKey clears this up.
    let json: JSON = [
       "string" : NSNull()
    ]
    
    json["string"].hasValue   // false
    json["string"].hasKey     // true
    

    Fixed

    • Issue where subclassing a Model subclass resulted in broken JSONTransformable conformance.
    let json: JSON = [
        "cars" : [
            [
                "model" : "BMW",
                "year" : 2015,
                "number_of_doors" : 4
            ]
        ]
    ]
    
    class Vehicle: Model, JSONTransformable {
        let model = Property<String>(key: "model")
        let year = Property<Int>(key: "year")
    }
    
    class Car: Vehicle {
        let numberOfDoors = Property<Int>(key: "number_of_doors")
    }
    
    class Garage: Model {
        let cars = PropertyArray<Car>(key: "cars")
    }
    
    let garage = Garage(json: json)
    
    // previously
    garage.cars.first   // nil
    
    // now
    garage.cars.first   // valid Car object
    
    Source code(tar.gz)
    Source code(zip)
  • 1.1(Sep 17, 2015)

    Added

    • Swift 2 support!
    • Default implementations for Model and RawRepresentable (String and Int) types.
    • isNil property on JSON

    Updated

    • Conformance to Equatable for JSON, Property, PropertyArray, and PropertyDictionary

    Renamed

    • ModelRocket class to Model, to fix a namespacing issue caused by the framework and class sharing the same name.
    Source code(tar.gz)
    Source code(zip)
Owner
Oven Bits
Oven Bits
Magical Data Modeling Framework for JSON - allows rapid creation of smart data models. You can use it in your iOS, macOS, watchOS and tvOS apps.

JSONModel - Magical Data Modeling Framework for JSON JSONModel allows rapid creation of smart data models. You can use it in your iOS, macOS, watchOS

JSONModel 6.8k Nov 19, 2021
macOS app to generate Swift 5 code for models from JSON (with Codeable)

SwiftyJSONAccelerator - MacOS app Codeable Model file Generator For Swift 5 Version v2.2 Generate initializer function for classes Application Downloa

Karthikeya Udupa 929 Dec 6, 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
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 comprehensive test task for creating an autolayout interface, requesting an API and JSON parsing from Effective Mobile.

ECOMMERCE A comprehensive test task for creating an autolayout interface, requesting an API and JSON parsing from Effective Mobile. ??‍?? Design ✨ Fea

Daniel Tvorun 4 Nov 21, 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
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
Reflection based (Dictionary, CKRecord, NSManagedObject, Realm, JSON and XML) object mapping with extensions for Alamofire and Moya with RxSwift or ReactiveSwift

EVReflection General information At this moment the master branch is tested with Swift 4.2 and 5.0 beta If you want to continue using EVReflection in

Edwin Vermeer 964 Dec 14, 2022
Himotoki (紐解き) is a type-safe JSON decoding library written purely in Swift.

Himotoki Himotoki (紐解き) is a type-safe JSON decoding library written purely in Swift. This library is highly inspired by the popular Swift JSON parsin

IKEDA Sho 799 Dec 6, 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
A type-safe JSON-RPC 2.0 library purely written in Swift

JSONRPCKit JSONRPCKit is a type-safe JSON-RPC 2.0 library purely written in Swift. // Generating request JSON let batchFactory = BatchFactory(version:

Shinichiro Oba 178 Mar 18, 2022
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
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