My service can receive several different jsons, such as:

```
{
   "event":"conversation_started",
   "context":"context information",
   "user":{
      "id":"01234567890A=",
      "name":"John McClane",
      "avatar":"http://avatar.example.com",
      "country":"UK",
      "language":"en",
      "api_version":1
   },
   "subscribed":false
}

```

or

```
 {
   "event":"message",
   "message":{
      "type":"text",
      "text":"a message to the service",
      "location":{
         "lat":12.34,
         "lon":12.34
      }
   }
}

```

or several else jsons. The only field that is the same for all jsons is "event". All other fields **can** be different (depends on "event" value). 

So the question is: how to convert those jsons to java objects (without making messy code)? The only way I know is to manually check "event" value (like `json.startsWith("{\n\"event\":\"message\"")` but I'm sure that there is any simple decision for doing this.