Skip to content

Tag: deserialization

How to parse TOML document with Java

In my Java app I get a TOML document from REST service response as String and I look how to parse it and convert to Java objects. Ideally I’d like to use some existing mapper library for deserialization, something like Jackson or Gson for JSON objects. Are there any options in Java ecosystem for that? A…

Adding custom arguments to Jackson deserializer

I have a custom deserializer. But I want to be able to pass additional arguments. For example How can I pass in my custom parameter on the annotation? Answer You cannot add your own parameters to @JsonDeserialize, because you can’t alter Jackson’s implementation of this annotation. However, you ca…

Get object from .readEntity

I have a java service which calls an API and gets the following in return How can i use .readEntity (or something else) to get the object for a given field; say service2 Or just convert all objects inside status to a List<> of objects String output = response.readEntity(String.class); works, but i dont …