title: Error when converting JSON HTTP POST request to Java object
body: <p>I would like to convert an HTTP POST request body (in JSON) to a Java object.</p>
  
  <p>I am using this Java code for the server-side: </p>
  
  <pre><code>ObjectMapper mapper = new ObjectMapper();
  clip = mapper.readValue(request.body(), Clip.class);
  </code></pre>
  
  <p>while the JavaScript (jQuery) client-side code is:</p>
  
  <pre><code>$.post("/insertClip", { "item": item.value, "value":value.value, "dimension":dimension.value });
  </code></pre>
  
  <p>When I run the application, this error appears:</p>
  
  <pre><code>org.codehaus.jackson.JsonParseException: Unexpected character ('i' (code 105)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
   at [Source: clips.json; line: 1, column: 2]
      at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1433)
      at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:521)
      at org.codehaus.jackson.impl.JsonParserMinimalBase._reportUnexpectedChar(JsonParserMinimalBase.java:442)
      at org.codehaus.jackson.impl.Utf8StreamParser._handleUnexpectedValue(Utf8StreamParser.java:2090)
      at org.codehaus.jackson.impl.Utf8StreamParser._nextTokenNotInObject(Utf8StreamParser.java:606)
      at org.codehaus.jackson.impl.Utf8StreamParser.nextToken(Utf8StreamParser.java:492)
      at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2770)
      at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2718)
      at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1817)
      at elements.DefinitedRoute$2.handle(DefinitedRoute.java:63)
      at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:133)
      at spark.webserver.JettyHandler.doHandle(JettyHandler.java:47)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:188)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      at org.eclipse.jetty.server.Server.handle(Server.java:342)
      at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
      at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1068)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:807)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)
      at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
      at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:241)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:528)
      at java.lang.Thread.run(Thread.java:724)
  </code></pre>
  
  <p>Why am I not able to convert this POST request to a Java object?</p>