Skip to content

carabina/IkigaJSON

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A high performance JSON library in Swift

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 99.1%
  • Ruby 0.9%