Forum Discussion
jferrandis
8 years agoExpert
Thanks but is this class available in freemarker?
If not, is there a way to add it ?
If not, is there a way to add it ?
donpacote
8 years agoHelper
i put my code
protected <T> T fromJson(byte[] data, Class<T> modelClass) {
return gson.fromJson(new String(data), modelClass);
}
protected String toJson(Object object) {
return gson.toJson(object);
}
public List makeResponse(HttpResponse httpResponse, LithiumRequest lithiumRequest) {
return Collections.singletonList(fromJson(httpResponse.getData(), getModelClass()));
}
- SuzieH8 years agoKhoros Alumni (Retired)
Hi jferrandis We don't provide a special FreeMarker call for this. You might want to add this to our Product Ideas board.
Related Content
- 3 months ago