Jump to content
Changes to the Jaspersoft community edition download ×

walid.asansas

Members
  • Posts

    1
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by walid.asansas

  1. Hello, I have the following use case: we have a JsonNode object coming from our persistence layer, we want to create a JsonDataSource using that JsonNode object before filling a Jasper Report. Now the question is: why do we have to convert that JsonNode to InputStream before creating the JsonDataSource? While checking the code source of the JsonDataSource class I can see the following constructor: protected JsonDataSource(JsonNode jsonTree, String selectExpression) throws JRException {But it is coded as protected and we can't call it in our case, we found out that converting the object to InputStream in order to use the public constructor, which will in fact convert the object back to a JsonNode, is not optimal and therefore I would like to know if there is any fix for this case? public JsonDataSource(InputStream jsonStream, String selectExpression) throws JRException { this(JsonUtil.parseJson(jsonStream), selectExpression); } Thank you for your efforts!
×
×
  • Create New...