0

I have a Spring MVC REST API where I make frequent changes to POJO classes which turns some information to JSON response (i will call them JSON-representational POJOs) which is consumed in an android app using RestTemplate and map the response to JSON POJOs.

Currently :

  1. I maintain same versions of JSON-representational POJOs on both android app code base and Spring MVC REST API codebase, changing it at both ends together when an edit to JSON-representational POJOs is required, and update my app in Google Play Store.

  2. Everyone who has my app installed may not update the app immediately and some functionality may break when Android App cannot consume latest JSON and throw exceptions etc.

  3. I don't want to change my API versions for small changes and I don't want to use HATEOS as this API is not a public API.

Need some advice on how to maintain interoperability with the older versions of my app out there consuming my changed REST API JSON.

webjack
  • 33
  • 2
  • 7

1 Answers1

0

One way around this issue currently I am facing is to add @JsonIgnoreProperties(ignoreUnknown = true) on the classes that I receive data in. Courtesy this question : Ignoring new fields on JSON objects using Jackson

Community
  • 1
  • 1
webjack
  • 33
  • 2
  • 7