Swiftpack.co - Package - Ikiga/IkigaJSON

IkigaJSON

IkigaJSON is a really fast JSON parser. It performed ~4x faster in our tests when decoding a type from JSON.

Adding the dependency

SPM:

.package(url: "https://github.com/Ikiga/IkigaJSON.git", from: "1.0.0"),

Cocoapods:

pod 'IkigaJSON', '~> 1.0'

Usage

import IkigaJSON

struct User: Codable {
    let id: Int
    let name: String
}

let data = Data()
var decoder = IkigaJSONDecoder()
let user = try decoder.decode(User.self, from: data)

Performance

By design you can build on top of any data storage as long as it exposes a pointer API. This way, IkigaJSON doesn't (need to) copy any data from your buffer keeping it lightweight. The entire parser can function with only 1 memory allocation and allows for reusing the Decoder to reuse the memory allocation.

Support

  • All decoding strategies that Foundation supports
  • Unicode
  • Codable
  • Escaping
  • Performance 🚀

TODO:

  • Date/Data encoding strategies
  • Raw JSON APIs (non-codable)
  • \u escaped unicode characters

Media

Architecture

Github

link
Stars: 8
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

1.0.3 - Nov 23, 2018

  • More performant JSON encoding

1.0.2 - Nov 20, 2018

Remove accidental submodule

1.0.1 - Nov 19, 2018

  • Reimplemented date decoding strategies and implemented some tests

1.0.0 - Nov 19, 2018

The initial release this high performance JSON library