The method toJSONObject(String) in the type XML is not applicable for the arguments (String, boolean)
Issue
I created my own WorkItemHandler to return a JSON String even if the API has returned a XML string. To convert the xml string to JSON I use the package org.json (it is a maven dependency) and the code:
JSONObject xmlJSONObj = XML.toJSONObject(content, true);
jsonString = xmlJSONObj.toString(0);
This works when I run it on Eclipse but I can't build the project on JBoss BPM Suite. It says "The method toJSONObject(String) in the type XML is not applicable for the arguments (String, boolean)".
Do you already have a default class XML that is overriding the org.json.XML class?
Environment
Red Hat JBoss BPM Suite 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
