Fragments 2019

State of mobile engineering, state of platforms, hardware and user research.


Performant and Reflection-Less JSON Parsing using STAG

Submitted by Anirudh Ramanan (@skynet) on Wednesday, 14 March 2018

Technical level: Advanced


How to improve the performance of JSON parsing in Android, and why STAG ?

This talk will cover the internal working of the infamous GSON library, and the performance bottlenecks that we hit, and how to take a Reflection-Less approach for the same.


  • How GSON serializes/deserailizes objects ?
  • Why is Reflection Expensive ?
  • Performance Issues with Current Implementation
  • What is TypeAdapter, and why to use it ?
  • Introduction to STAG
  • STAG in Parity with GSON

Speaker bio

While working on the performance aspects of parsing, we came across a library STAG. The overall idea of the library was good, and with initial testing we found a good boost in parsing performance. We added a bunch of features, and contributed back to the open source community. Now, STAG is in parity with GSON, and we had ~20% improvement in parsing time, and cold boot time.

Mobile Developer @Flipkart



  • Zainab Bawa (@zainabbawa) Reviewer 9 months ago

    The slides are not accessible anymore, Anirudh. We need access to the slides. You also have to upload a preview video by 25 February, explaining what this talk is about and why participants should attend it?

  • Alice Webster (@alicewebster) 8 months ago

Login with Twitter or Google to leave a comment