ObjectMapper mapper = new ObjectMapper();
StringWriter writer = new StringWriter();
mapper.writeValue(writer, m);
String json = writer.toString();
return new InputStreamBlob(new ByteArrayInputStream(
json.getBytes("UTF-8")), "application/json");
} else {
@SuppressWarnings("unchecked")
PageProvider<MiniMessage> pageProvider = (PageProvider<MiniMessage>) pageProviderService.getPageProvider(
PROVIDER_NAME, null, targetLimit, 0L, props);
pageProvider.setCurrentPageOffset(targetOffset);
String json = toJSON(pageProvider, locale, session);
return new InputStreamBlob(new ByteArrayInputStream(
json.getBytes("UTF-8")), "application/json");
}
}