camel-mongodb does not return JSON
Issue
A Camel route makes a MongoDB query that is expected to return JSON data. For example:
from("direct:foo")
.to("mongodb:myDb?database=foos&collection=bar&operation=findAll")
//...
After invocation of the MongoDB endpoint, the exchange body might be expected to contain JSON data. In earlier versions of Fuse that appeared, in fact, to be the the case. With recent versions, however, the exchange body, when rendered into a String
, has this form:
[Document{...}]
This is not valid JSON.
Environment
- Red Hat Fuse
- 7.10
Other versions are probably affected.
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.