You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to write a simple generic entity (Widget) to json I get the warning: Generic bound not found for type T declared in class Widget. I would expect that if I wrap the Widget in a GenericEntity<Widget> that the generic type information that is passed in to the MessageBodyWriter#writeTo method implemented in JsonBindingProvider would be passed on the the jsonb#toJson method as so: jsonb.writeTo(obj, genericType). That doesnt seem to be the case, as JsonBindingProvider ignores the generic type parameter altogether. Perhaps this is the intented behavior, but some clarification would be nice. I am also curious as to why these 2 lines were used: entityStream.write(jsonb.toJson(o).getBytes(AbstractMessageReaderWriterProvider.getCharset(mediaType))); entityStream.flush();
instead of using: jsonb.toJson(o, genericType, entityStream);
The text was updated successfully, but these errors were encountered:
@etay2000 Commented
I'm not going to hold my breath on this getting resolved any time soon, but if I am not mistaken, it looks like the last time any issue was assigned to anyone was September 21. Is @pavelbucek the only person available and or responsible for resolving Jersey issues?
When trying to write a simple generic entity (Widget) to json I get the warning: Generic bound not found for type T declared in class Widget. I would expect that if I wrap the Widget in a GenericEntity<Widget> that the generic type information that is passed in to the MessageBodyWriter#writeTo method implemented in JsonBindingProvider would be passed on the the jsonb#toJson method as so: jsonb.writeTo(obj, genericType). That doesnt seem to be the case, as JsonBindingProvider ignores the generic type parameter altogether. Perhaps this is the intented behavior, but some clarification would be nice. I am also curious as to why these 2 lines were used:
entityStream.write(jsonb.toJson(o).getBytes(AbstractMessageReaderWriterProvider.getCharset(mediaType))); entityStream.flush();
instead of using:
jsonb.toJson(o, genericType, entityStream);
The text was updated successfully, but these errors were encountered: