code: public static final String serializeToJSONPString(final String callback,
        final Object object) {
      if (callback == null || callback.isEmpty())
        throw new IllegalArgumentException("Missing callback name");
      if (object == null)
        throw new IllegalArgumentException("Object was null");
      try {
        return jsonMapper.writeValueAsString(new JSONPObject(callback, object));
      } catch (JsonProcessingException e) {
        throw new JSONException(e);
      }
    }
docs: Serializes the given object and wraps it in a callback function
  i.e. &lt;callback&gt;(&lt;json&gt;)
  Note: This will not append a trailing semicolon
  @param callback The name of the Javascript callback to prepend
  @param object The object to serialize
  @return A JSONP formatted string
  @throws IllegalArgumentException if the callback method name was missing
  or object was null
  @throws JSONException if the object could not be serialized