title: Can not serialize instance of class out of START_ARRAY token\n
body: <p>I am trying to use a web service with RESTful and JSON.</p>
  
  <p>This is my method for POST:</p>
  
  <pre><code>@POST
  public Response setCustomerInvoiceNotifications(SetCustomerInvoiceNotificationsRequestBO requestBO, @Context HttpHeaders hh) throws JSONException, Exception {
     init(config);
  
      Response response = null;
      ResultBO resultBO = (ResultBO) roalCache.callService("setCustomerInvoiceNotifications", requestBO, true);
      if (resultBO != null) {
          if (resultBO.getResult() != null) {
  
              SetCustomerInvoiceNotificationsResponseBO responseBO = (SetCustomerInvoiceNotificationsResponseBO)resultBO.getResult();
              ObjectFactory factory = new ObjectFactory();
              JSONObject jsonObject = new JSONObject(responseBO); 
              String result = "@Produces(\"application/json\") Output: \n\n Output: \n\n" + jsonObject;
              response = Response.status(200).cookie(cookie).entity(result).build();
          } else if (resultBO.getCause() != null) {
              JSONObject jsonObject = new JSONObject(resultBO.getCause());
              logger.debug("[{}]  jsonObject.toString = ",  jsonObject.toString() );
              String result = "@Produces(\"application/json\") Output: \n\n Output: \n\n" + jsonObject;  
              logger.debug("[{}]  jsonObject result = ",  result );
              response = Response.status(500).cookie(cookie).entity(result).build();  
          }
      }      
      return response;
  }   
  </code></pre>
  
  <p>I am using a JSON with array:</p>
  
  <pre><code>[{
      "correlationId": "12345432",
      "customerId": "8508871",
      "notificationWhenIssued": {
          "destinations": {
              "channel": "email",
              "address": "razvan.nicolae90@yahoo.com"
          }
      },
      "notificationBeforeDueDate": {
          "destinations": {
              "channel": "email",
              "address": "razvan.nicolae90@yahoo.com"
          },
          "daysBeforeDueDate": "2"
      }
  }]
  </code></pre>
  
  <p>After I post the JSON, I get this message error: </p>
  
  <pre><code>{"message":"Can not deserialize instance of com.upc.portal.business.SetCustomerInvoiceNotificationsRequestBO 
  out of START_ARRAY token\n at 
  [Source: weblogic.servlet.internal.ServletInputStreamImpl@17ac5e2; line: 1, column: 1]",
  "stackTrace":"[org.codehaus.jackson.map.JsonMappingException.from(Unknown Source)...
  </code></pre>