Popularity
5.6
Stable
Activity
0.0
Stable
570
19
42

Programming language: Swift
License: MIT License
Tags: JSON     Parsing    
Latest version: v1.0.1

FlatBuffersSwift alternatives and similar libraries

Based on the "JSON" category.
Alternatively, view FlatBuffersSwift alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of FlatBuffersSwift or a related project?

Add another 'JSON' Library

README

FlatBuffersSwift

Join the chat at https://gitter.im/mzaks/FlatBuffersSwift Build Status

Motivation

This project brings FlatBuffers (an efficient cross platform serialization library) to Swift.

One minute introduction

There are three simple steps for you to use FlatBuffersSwift

1. Write a schema file

table List {
  people : [Person];
}

table Person {
  firstName : string;
  lastName : string;
}

root_type List;

2. Generate Swift code

fbsCG console application can be found here: https://github.com/mzaks/FlatBuffersSwiftCodeGen To generate, please execute it as following: fbsCG contacts.fbs contacts.swift

3. Use the generated API

Create objects and encode them

let p1 = Person(firstName: "Maxim", lastName: "Zaks")
let p2 = Person(firstName: "Alex", lastName: "Zaks")
let list = List(people: [p1, p2])
let data = try?list.makeData()

Decode data very efficiently

let newList = List.from(data: data)
let name = newList?.people[0].firstName

Please check out Wiki for more information.