https://bz.apache.org/bugzilla/show_bug.cgi?id=59609

Michael Chirlin <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #3 from Michael Chirlin <[email protected]> ---
There is an additional use case in which the extractedObject is an instanceof
JSONArray rather than a Map (JSONObject).

I propose updating the JSONManager stringifyJSONObject the following:

private String stringifyJSONObject(Object obj) {
  if (obj instanceof JSONArray) {
    return ((JSONArray) obj).toJSONString();
  } else if (obj instanceof Map) {
    return new JSONObject((Map<String, ?>) obj).toJSONString();
  }
  return obj == null ? "" : obj.toString(); //$NON-NLS-1$
}

An example would be:

{
  "saveInto": [
    "string1"
  ]
}

using JSONPath:

$.saveInto

I'm not sure how you create the attachments or I would do it for you.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to