SHARE
TWEET

Untitled

a guest Sep 17th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @JsonDeserialize(using = CustomDeserializer.class)
  2. public class Plan {
  3.  private String ex;
  4.  private String alpha;
  5. }
  6. @JsonComponent
  7. public class CustomDeserializer extends JsonDeserializer<Plan> {
  8.   @Override
  9.     public Plan deserialize(JsonParser jsonParser, DeserializationContext deserializationContext)
  10.       throws IOException, JsonProcessingException {
  11.         //TODO WRITE LOGIC TO DECODE J
  12.         TreeNode treeNode = jsonParser.getCodec().readTree(jsonParser);
  13.         TextNode ex = (TextNode) treeNode.get("ex");
  14.     }
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top