I have this xml which needed to be processed and converted to JSON:
<jsonObject>
<number>1234</number>
<emptyString/>
<string>hello</string>
</jsonObject>
When it runs through JsonStreamBuilder like this:
<property name="messageType" scope="axis2" type="STRING" value="application/json"/>
I get JSON like that:
{
"number":1234,
"emptyString": null,
"string":"hello"
}
So I am wondering is there any way that I can configure JsonStreamBuilder to treat empty tag not as null, but as empty string, furthermore I want numbers to be treated as strings as well.
Maybe I can modify the default XML to fit my needs?
BTW I am using WSO2 EI 6.1.1