JSON Schemas are awesome

The company that I work with has increased their native app development capacity by a huge margin in the last few years. We went from two native app developers to 10 at the moment. While there has been a lot of growth on the native app development side, we’ve had only one backend developer, developing the API that both the iOS and Android app use to retrieve their data.

While we are continuously adding new features you can see that the imbalance between amount of app developers and backend developers poses a challenge. We noticed that we were waiting more and more for the backend to be built which eventually slows us down.

JSON schema’s are one tool that I’ve found work really well in this scenario. This allows the app developer(s) and backend developer to agree on a standard that’ll be used to communicate. Once that standard has been defined both developers can separately build the code that’s needed to make it function.

At the moment this is all that we are using these JSON schemas for. However there is a lot more possible to do with this:

  • Validating that the API always follows the schema.
  • Building living documentation using tools such as Swagger.
  • Use these schemas to generate valid example JSON output that can be used while testing.
Published 24 Feb 2019

I blog about Android.
Joey Kaan on Twitter