title: How to fill report using JSON datasource without getting null values?
body: <p>I'm using Jasper Reports to build a simple report pdf. I have a JSON file that looks like this:</p>
  
  <pre><code>{"employees": [
      {"firstName" : "John", "lastName" : "Doe"},
      {"firstName" : "Anna", "lastName" : "Smith"},
      {"firstName" : "Peter", "lastName" : "Jones"}
  ]}
  </code></pre>
  
  <p>And I'm trying to read it in like this:</p>
  
  <pre><code>File file = new File("E:/Workspaces/jasperPDFreport/src/main/resources/emp.json");
  JsonDataSource datasource = new JsonDataSource(file);
  
  JasperDesign jasperDesign = JRXmlLoader.load("E:/Workspaces/jasperPDFreport/src/main/resources/jsonTemplate.jrxml");
  JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
  Map parameters = new HashMap();
  JasperPrint jasperPrint;
  jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, datasource);
  JasperExportManager.exportReportToPdfFile(jasperPrint, "BasicReport.pdf");
  JasperViewer.viewReport(jasperPrint);
  </code></pre>
  
  <p>However my the values from the JSON file are not passed to my pdf. </p>
  
  <p>This is my Template: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!-- Created with Jaspersoft Studio version 6.1.1.final using JasperReports Library version 6.1.1  --&gt;
  &lt;!-- 2015-10-22T13:45:32 --&gt;
  &lt;jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Blank_A4_2" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="9e494ebe-c1fb-4448-bcee-38994e9720f7"&gt;
      &lt;!--property name="net.sf.jasperreports.json.source" value="emp.json"/--&gt;
      &lt;queryString language="json"&gt;
          &lt;![CDATA[employees]]&gt;
      &lt;/queryString&gt;  
      &lt;field name="firstName" class="java.lang.String"&gt;
          &lt;fieldDescription&gt;&lt;![CDATA[firstName]]&gt;&lt;/fieldDescription&gt;
      &lt;/field&gt;
      &lt;field name="lastName" class="java.lang.String"&gt;
          &lt;fieldDescription&gt;&lt;![CDATA[lastName]]&gt;&lt;/fieldDescription&gt;
      &lt;/field&gt;
      &lt;background&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/background&gt;
      &lt;detail&gt;
          &lt;band height="125" splitType="Stretch"&gt;
              &lt;textField&gt;
                  &lt;reportElement x="100" y="0" width="100" height="30" uuid="02b279da-3795-4655-8571-5a36a3ef378c"/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{firstName}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="0" y="0" width="100" height="30" uuid="671e61ad-8d8f-48cb-969f-78c05a516398"/&gt;
                  &lt;text&gt;&lt;![CDATA[firstName]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField&gt;
                  &lt;reportElement x="100" y="30" width="100" height="30" uuid="9d53f46f-a252-48b3-9213-8c3092c29f49"/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{lastName}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="0" y="30" width="100" height="30" uuid="3b49affb-685a-4df2-a872-c0e6fdcab94b"/&gt;
                  &lt;text&gt;&lt;![CDATA[lastName]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/detail&gt;
  &lt;/jasperReport&gt;
  </code></pre>
  
  <p>Now you see the commented out line  </p>
  
  <blockquote>
    <p>property name="net.sf.jasperreports.json.source" value="emp.json"</p>
  </blockquote>
  
  <p>If I comment this in, everything works as intended, I don't want to hard code my JSON values into the template, because later on I want to get them from a rest service, that's not ready yet. I do not understand, why the values are not getting parsed into the report, instead i just get two null values. </p>