title: Getting an error when using java.lang.Long fields with a JsonDataSource if locale in the datasource object is not specified, in JasperReport
body: <p>I'm facing aforementioned issue with jasper report when I'm trying with JsonDataSource. </p>
  
  <p>I have my report data constructed into a JSON complying <code>String</code> and create a <code>net.sf.jasperreports.engine.data.JsonDataSource</code> object using that which is then passed to the Jasper fillReport api:</p>
  
  <pre><code>jasperPrint = JasperFillManager.fillReport(getJasperTemplatePath(), criteria.getReportParams(), jsonDataSource);
  </code></pre>
  
  <p>here I'm passing the JSON_LOCALE along with few other parameters, but somehow jasper wasn't able to compile the report and complained about fields with <code>java.lang.Long</code></p>
  
  <pre><code>Error filling print... Unable to get value for field 'total_clickthrough' of class 'java.lang.Long'
  net.sf.jasperreports.engine.JRException: Unable to get value for field 'total_clickthrough' of class 'java.lang.Long'
    at net.sf.jasperreports.engine.data.JsonDataSource.getFieldValue(JsonDataSource.java:234)
    at net.sf.jasperreports.engine.fill.JRFillDataset.setOldValues(JRFillDataset.java:1330)
  </code></pre>
  
  <p>After debugging, found out that this is somehow due to the <code>locale</code> field being null in the JsonDataSource object. It doesn't seems to get it from the parameters. So I tried setting the locale directly to the datasource object as well, which works fine.</p>
  
  <p>Then I ran into problems with my sub reports, where I use following expression to create json datasource for the report, based on a field of parent report.</p>
  
  <pre><code>&lt;dataSourceExpression&gt;&lt;![CDATA[new net.sf.jasperreports.engine.data.JsonDataSource(new java.io.ByteArrayInputStream($F{data}.toString().getBytes("UTF-8")))]]&gt;&lt;/dataSourceExpression&gt;
  </code></pre>
  
  <p>Here again it has the same issue with number values which I'm pretty sure due to the locale, but the thing is i'm not able to set the JsonDataSource locale since i'm using the expression inside report jrxml. </p>
  
  <p>All the jasper examples I could find related to jsonDatasource are using json files directly using <code>net.sf.jasperreports.json.source</code>, so aren't quite relevant to this issue.</p>
  
  <p>Is there anyway to get around this? 
  Any help regarding this is much appreciated! </p>