Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Beyond JSON
@iceX33
Game developer at Wooga
What was the most
discussed topic of Swift
community?
JSON parsing!
What if I tell you there is
another way?
Meet FlatBuffers
It was originally created at Google
for game development and other
performance-critical applications.
FlatBuffers
is an efficient cross platform
serialization library for C++, Java,
C#, Go, Python and JavaScript (C,
PHP & Ruby ...
FlatBuffersSwift
What is so good about
FlatBuffers?
There is no parsing
involved!!!
Reading data can be done lazy
(almost zero cost)
It's backwards and
forwards compatible
new code can read old data
&
old code can read new data
It's not human readable
And it's a good thing!
(Easy to encrypt and to compress)
FlatBuffers Swift has a really nice API:
let data = NSData(contentsOfFile: "contactList.bin")!
let byteArray = UnsafePointe...
If you are interested or
want to get involved?
https://github.com/mzaks/
FlatBuffersSwift
Upcoming SlideShare
Loading in …5
×

Beyond JSON with FlatBuffers

5,348 views

Published on

Präsentation at Swift Berlin

Published in: Software
  • Be the first to comment

  • Be the first to like this

Beyond JSON with FlatBuffers

  1. 1. Beyond JSON @iceX33 Game developer at Wooga
  2. 2. What was the most discussed topic of Swift community?
  3. 3. JSON parsing!
  4. 4. What if I tell you there is another way?
  5. 5. Meet FlatBuffers It was originally created at Google for game development and other performance-critical applications.
  6. 6. FlatBuffers is an efficient cross platform serialization library for C++, Java, C#, Go, Python and JavaScript (C, PHP & Ruby in progress).
  7. 7. FlatBuffersSwift
  8. 8. What is so good about FlatBuffers?
  9. 9. There is no parsing involved!!! Reading data can be done lazy (almost zero cost)
  10. 10. It's backwards and forwards compatible new code can read old data & old code can read new data
  11. 11. It's not human readable And it's a good thing! (Easy to encrypt and to compress)
  12. 12. FlatBuffers Swift has a really nice API: let data = NSData(contentsOfFile: "contactList.bin")! let byteArray = UnsafePointer<UInt8>(data.bytes) let contactList = ContactList.fromByteArray(byteArray) if let birthday = contactList.entries[5]?.birthday { birthday.day = 12 birthday.month = 6 } let newData = config.toByteArray
  13. 13. If you are interested or want to get involved? https://github.com/mzaks/ FlatBuffersSwift

×