You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sekaijin <je...@aphp.fr> on 2016/09/24 13:59:34 UTC

Re: Howto save data with camel-mongodb

Hi,

I locate the problem in the code.
but I have not found yet, solution.
in
https://github.com/apache/camel/blob/master/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/converters/MongoDbBasicConverters.java
there are some (DBObject) JSON.parse(s);

But JSON is a simple parser that does not support the features of BSON.
https://github.com/mongodb/mongo-java-driver/blob/master/driver/src/main/com/mongodb/util/JSON.java

I'm not sure, but I think we should perhaps look
https://github.com/mongodb/mongo-java-driver/blob/master/bson/src/main/org/bson/json/JsonReader.java
seen online: 204
                } else if ("ObjectId".equals(value)) {
                    setCurrentBsonType(BsonType.OBJECT_ID);
                    currentValue = visitObjectIdConstructor();

A+JYT



--
View this message in context: http://camel.465427.n5.nabble.com/Howto-save-data-with-camel-mongodb-tp5785497p5787992.html
Sent from the Camel - Users mailing list archive at Nabble.com.