title: WSO2AM 1.10.0 - JSONStream END_OBJECT
body: <p>I'm using org.apache.synapse.commons.json.JsonStreamBuilder and org.apache.synapse.commons.json.JsonStreamFormatter in the wso2am 1.9.1, and I don't have problems with JSON malformed, but in wso2am 1.10.0, I got this error:</p>
  
  <pre><code>[2016-06-30 23:50:22,489] ERROR - AnonymousListMediator javax.xml.stream.XMLStreamException: ParseError at [row,col]:[4,10]
  Message: Unexpected symbol: END_OBJECT
  org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[4,10]
  Message: Unexpected symbol: END_OBJECT
      at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
      at org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.java:653)
      at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.buildNext(OMSourcedElementImpl.java:880)
      at org.apache.axiom.om.impl.llom.OMNodeImpl.getNextOMSibling(OMNodeImpl.java:122)
      at org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:343)
      at org.apache.axiom.om.impl.traverse.OMChildrenIterator.getNextNode(OMChildrenIterator.java:36)
      at org.apache.axiom.om.impl.traverse.OMAbstractIterator.hasNext(OMAbstractIterator.java:58)
      at org.apache.synapse.commons.json.JsonUtil.removeIndentations(JsonUtil.java:414)
      at org.apache.synapse.commons.json.JsonUtil.removeIndentations(JsonUtil.java:421)
      at org.apache.synapse.commons.json.JsonUtil.removeJsonPayload(JsonUtil.java:624)
      at org.apache.synapse.mediators.transform.PayloadFactoryMediator.mediate(PayloadFactoryMediator.java:158)
      at org.apache.synapse.mediators.transform.PayloadFactoryMediator.mediate(PayloadFactoryMediator.java:100)
      at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
      at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
      at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
      at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:203)
      at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
      at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
      at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:155)
      at org.apache.synapse.mediators.MediatorFaultHandler.onFault(MediatorFaultHandler.java:86)
      at org.apache.synapse.FaultHandler.handleFault(FaultHandler.java:102)
      at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:89)
      at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
      at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:317)
      at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:363)
      at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:142)
      at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>Yes, I have a JSON malformed in my application, but I can't fix this now, there is a way to get the same behavior that wso2am 1.9.1? This is a bug or api manager don't have to pass JSON malformed?</p>
  
  <p><strong>Edited</strong>: If I use org.apache.axis2.json.JSONStreamFormatter and org.apache.axis2.json.JSONStreamBuilder, I don't have the problems, but I saw that is cause a fail on the Prototyped APIS, the GET methods don't work after change this configuraton.</p>
  
  <p>Thank you</p>