private SyncError getSyncError ( JsonNode jsonNode ) throws IOException { ObjectMapper mapper = new ObjectMapper ( ) ; SimpleModule simpleModule = new SimpleModule ( "SyncErrorDeserializer" , new Version ( 1 , 0 , 0 , null ) ) ; simpleModule . addDeserializer ( SyncError . class , new SyncErrorDeserializer ( ) ) ; mapper . registerModule ( simpleModule ) ; return mapper . treeToValue ( jsonNode , SyncError . class ) ; }
Method to deserialize the SyncError object