private static Object deserializeBody ( String value , Type resultType , Type wireType , SerializerAdapter serializer , SerializerEncoding encoding ) throws IOException { if ( wireType == null ) { return serializer . deserialize ( value , resultType , encoding ) ; } else if ( TypeUtil . isTypeOrSubTypeOf ( wireType , Page . class ) ) { return deserializePage ( value , resultType , wireType , serializer , encoding ) ; } else { final Type wireResponseType = constructWireResponseType ( resultType , wireType ) ; final Object wireResponse = serializer . deserialize ( value , wireResponseType , encoding ) ; return convertToResultType ( wireResponse , resultType , wireType ) ; } }
Deserialize the given string value representing content of a REST API response .