Fragments 2019

State of engineering, design and product development in the mobile ecosystem

Performant and Reflection-Less JSON Parsing using STAG

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


Technical level




Vote on this proposal

Login to vote

Total votes:  +7


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



Login with Twitter or Google to leave a comment