title: How to pass a json object as a parameter in a REST request URL with Springboot
body: <p>I have looked at the various answers and they do not resolve my issue. I have a very specific client need where I cannot use the body of the request.</p>
  
  <p>I have checked these posts:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/29313687/trying-to-use-spring-boot-rest-to-read-json-string-from-post">Trying to use Spring Boot REST to Read JSON String from POST</a></li>
  <li><a href="https://stackoverflow.com/questions/6019562/parsing-json-in-spring-mvc-using-jackson-json/6019761#6019761">Parsing JSON in Spring MVC using Jackson JSON</a></li>
  <li><a href="https://stackoverflow.com/questions/36695555/pass-json-object-in-rest-web-method">Pass JSON Object in Rest web method</a></li>
  </ul>
  
  <p>Note: I do encode the URI. </p>
  
  <p>I get various errors but illegal HTML character is one. The requirement is quite simple:</p>
  
  <p>Write a REST service which accepts the following request</p>
  
  <p><code>GET /blah/bar?object=object11&amp;object=object2&amp;...</code></p>
  
  <p>object is a POJO that will come in the following JSON format</p>
  
  <pre><code>{
      "foo": bar,  
      "alpha": {       
          "century": a,
      }
  }
  </code></pre>
  
  <p>Obviously I will be reading in a list of object...</p>
  
  <p>My code which is extremely simplified... as below.</p>
  
  <pre><code> @RequestMapping(method=RequestMethod.GET, path = "/test")
   public Greeting test(@RequestParam(value = "object", defaultValue = "World") FakePOJO aFilter) {
       return new Greeting(counter.incrementAndGet(), aFilter.toString());
   }
  </code></pre>
  
  <p>I have also tried to encapsulate it as a String and convert later which doesnt work either.</p>
  
  <p>Any suggestions? This should really be extremely simple and the hello world spring rest tut should be a good dummy test framework.</p>
  
  <p>---- EDIT ----</p>
  
  <p>I have figured out that there is an underlying with how jackson is parsing the json. I have resolved it but will be a write up.. I will provide the exact details after Monday. Short version. To make it work for both single filter and multiple filters capture it as a string and use a json slurper</p>