问题
When using the Camel XMLJSON library and when converting an XML message to JSON using the unmarshal option. The application is converting the empty tags to empty JSON arrays. Is there a way to override this behavior to instead convert it into empty strings.
For example
<person>
<first_name>john</first_name>
<last_name/>
</person>
converts to
{
"first_name": "john",
"last_name": []
}
instead of the below
{
"first_name": "john",
"last_name": ""
}
How can this default behavior be overridden to provide the second output
来源:https://stackoverflow.com/questions/47056627/apache-camel-xmljson-conversion-for-empty-tags-to-strings-instead-of-arrays