Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 GSON 中,我接下来可以:
Type envelopeType = TypeToken.getParameterized(RestResponse.class, type).getType();
在莫西:
Type envelopeType = Types.newParameterizedType(RestResponse.class, type);
我怎么能用杰克逊 json 做到这一点?
TypeFactory是 jackson-databind 的一部分,可能会提供您正在寻找的方法。