Mined Opinions For API: org.mongodb

This tab contains all the opinions collected from Stack Overflow about the API. The other tabs present summaries of the opinions using different algorithms.
  • Thanks, though!.. details
  • All my MongoDB query's are through Morphia to keep the code clean.. details
  • The most clean solution I found so far: use the build-in MappingMongoConverter of spring-data-mongodb.. details
  • The advantage of using MongoDB over simple JSON files is that, like any database, you can query your documents.. details
  • So if you think any kind of search will be useful, MongoDB might be an attractive option.. details
  • Good, hope someone has a solution.. details
  • But take a look at MongoDB or CouchDB, which may actually be perfect for you.. details
  • I'm looking for a 'clean' answer to this as well.. details
  • cool... thanks for your reply.. details
  • @Sam, That's useful information.. details
  • What do you meant when you said: 'You should only do this if you never intended to query the json data, which is what Mongo is good at.?. details
  • @brainOverflow That is what I thought was easy.. details
  • Thanks for reply.. details
  • And when I say paging is the standard way of doing this, this applies to SQL databases as well as Mongo.. details
  • I am now using java method com.mongodb.util.JSON.parse(param) to convert my json string to a DBObject.I find that, in most cases , for example , when the key in the json string is simple type like string or int ,it can be used by both JSON.parse() method and terminal.For example: CODESNIPPET_JAVA1 .. details
  • Both JSON.parse({'times':8}) and db.collection.find({'times':8}) in terminal can work correctly.. details
  • Open the file as BINARY (not TEXT!). details
  • The procedure is simple: 1.. details
  • 2)Once the parsing is over, save the json Object in the Mongo Document.. details
  • Now here's some real magic for y'all!. details
  • I tried initializing the string just before the query like this: CODESNIPPET_JAVA7 .. details
  • When I initialize it like that, Mongo doesn't escape the quotes and the query works.. details
  • Thank you all for reading!. details
  • The query is put together in Java like so: CODESNIPPET_JAVA2 .. details
  • In shell, the query I'm talking about looks like this: CODESNIPPET_JAVA1 .. details
  • It can hold any value, but in this example it contains the following elements: CODESNIPPET_JAVA3 .. details
  • URL_http://api.mongodb.org/java/current/com/mongodb/DBCollection.html#insert(j ava.util.List) [ URL_http://api.mongodb.org/java/current/com/mongodb/DBCollection.h tml#insert(java.util.List)] That said, it's not that much faster.. details
  • Good question.. details
  • Otherwise you could just build a BasicDBObject with the new value.. details
  • Then you can return it how ever you please.. details
  • But the result is like: CODESNIPPET_JAVA3 .. details
  • I want it to be displayed like: CODESNIPPET_JAVA4 .. details
  • Well, this data was stored in RDMS in regular column-rows format, but in the process of sending it from one server to another we are marshalling it as JSON.. details
  • I would be happy if someone can refer me to JSON format specification which is acceptable by MongoDB.. details
  • Store multiple JSON documents (in row arrays format with nested JSON key-value objects) in MongoDB.. details
  • I have json file where each line looks like: CODESNIPPET_JAVA1 .. details
  • But this again stores the value as CODESNIPPET_JAVA3 .. details
  • The issue here is the collection accepts the location in the form of an array which holds double value.. details
  • Any idea how to add a location object ( which is an array holding double value) to the JSON object and thereby to the collection by converting the JSON object to a DBObject?. details
  • The below URL says that this cannot be accomplished.. details
  • URL_https://groups.google.com/forum/#!topic/mongodb-user/TUjAxag6yT4 [ URL_https://groups.google.com/forum /#!topic/mongodb-user/TUjAxag6yT4] But still some part of my brain says there should be a way.. details
  • I am looking a way to insert a location value to a collection in MongoDB.. details
  • This is the easiest (and, I believe, most correct) way to do something like this.. details
  • To accomplish this, I created a very simple custom serializer: CODESNIPPET_JAVA2 .. details
  • Have a look at URL_https://github.com/EqualExperts/mongo-shell-like-query [ URL_https://github.com/EqualExperts/mongo-shell-like-query ] .. details
  • I would recommend to use mongo-shell-like-query utility (jar).. details
  • It also supports advance features such as aggregation pipeline.. details
  • However, if you are working exclusively with JSON, you might want to investigate third party libraries like URL_http://mongojack.org/ [MongoJack] - this uses the Java driver under the covers, but translates the results of your query directly into JSON for you.. details
  • Actually i am sending a large collection to client, and if i convert documents of this collection into java object than it eat lot of memory, so if there a way to convert dbcursor direct to json string , or any other method which solve my problem.it will be great help.Thanks.. details
  • Its look like mongodriver create DataObject's objects, when call find method, so it will not help to convert dbcursor into json (which is possible by using serialize() method of com.mongodb.util.JSON class.. details
  • URL_http://docs.mongodb.org/manual/reference/operator/max/ [ URL_http://docs.mongodb.org/manual/reference/operator/max/ ] Just in case you are interested in using aggregation operators $max or $min, the following link provide details and sample code.. details
  • URL_http://docs.mongodb.org/manual/reference/operator/max/ [ URL_http://docs.mongodb.org/manual/reference/operator/max/ ] Just in case you are interested in using aggregation operators $max or $min, the following link provide details and sample code.. details
  • Any advice would be appreciated!. details
  • I've been using CODETERM1 to read the query, which worked fine until I started reading queries that contained operators like $max and $min.. details
  • In a project I'm working on, at one point I read a query to mongodb from a string.. details
  • There seems to be a standard technique for converting JSON objects into DBObject i.e CODESNIPPET_JAVA1 .. details
  • It looks like you are assuming a collection of emails where each document has one sender and one receiver and now you want to find all senders who also happen to be receivers of email?. details
  • I was inspired by this article URL_http://tebros.com/2011/07/using-mongodb-mapreduce-to-join-2-collections/ [ URL_http://tebros.com/2011/07/using-mongodb-mapreduce-to-join-2-collections/ ] .. details
  • Is there any way how to solve it?Thanks a lot.. details
  • I was inspired by this article URL_http://tebros.com/2011/07/using-mongodb-mapreduce-to-join-2-collections/ [ URL_http://tebros.com/2011/07/using-mongodb-mapreduce-to-join-2-collections/ ] .. details
  • I was thinking about something like this: CODESNIPPET_JAVA2 .. details
  • Could somebody explain it to me please?. details
  • I'd like to do something like CODESNIPPET_JAVA1 .. details
  • but none of them is working and I don't understand this MapReduce-thing well.. details
  • The POJO B has a lot of property members, so one idea was to make a simple proxy POJO and then Serialize.. details
  • This works fine except that the id of the object is not included in the print-out of the object.. details
  • My use cases : I use jackson as serialization when I need to save blobs to storage systems (Redis, Cassandra, Mongo, ... sometime mysql too).. details
  • In URL_http://docs.mongodb.org/ecosystem/drivers/java-types /#regular-expressions [Java] you have to use CODETERM2 like this: CODESNIPPET_JAVA1 .. details
  • Is there any way to accomplish this in java?. details
  • I am trying to create JSON query string for MongoDB, In order to support regular expression I need to create JSON string that has values without quotes.. details
  • I want to basically store those headers in a meaningful way.. details
  • I am basically working on creating a restful API which produces surveys and consumes survey responses.. details
  • So following are kind of queries i'll be performing Match HTTP Requests with Referer as major search engines.. details
  • Match HTTP Match requests where URL param is some kind of regex Match HTTP Request Match requests where some Cookie and it's given value is present and list goes on.. What should a Morhpia model look like to achieve I described above ?. details
  • I want to log incoming HTTP request data for a survey application and later planning to analyze the data by performing various kind of "rule matching" on that request data.. details
  • I want to treat standard headers like Referer,Cookie,URL etc as first class citizens for query the data later.. details
  • There are some standard headers with specific values, and there are some custom headers with custom values.. details
  • This seems to be a strange use case for MongoDB, it could be stored like this: CODESNIPPET_JAVA1 .. details
  • You should only do this if you never intended to query the json data, which is what Mongo is good at.. details
  • You should only do this if you never intended to query the json data, which is what Mongo is good at.. details
  • This sounds like the case because the json data was stored in a RDBMS field.. details
  • Can I not directly save my JSON string directly to Mongo without parsing, I see that the mongo shell can do that.. details
  • There are multiple tutorials like URL_http://www.mkyong.com/mongodb/java- mongodb-insert-a-document/ [this] and URL_http://supundharmarathne.wordpress.com/2012/09/02/simple-crud-operations- with-java-and-mongodb-part-1/ [this] which describes saving JSON data using JSON.parse method which returns DBObject.. details
  • There are multiple tutorials like URL_http://www.mkyong.com/mongodb/java- mongodb-insert-a-document/ [this] and URL_http://supundharmarathne.wordpress.com/2012/09/02/simple-crud-operations- with-java-and-mongodb-part-1/ [this] which describes saving JSON data using JSON.parse method which returns DBObject.. details
  • The reason I ask this is because I have thousands of documents in chunks and I may save time by not parsing data!. details
  • Thank you for your suggestion!!. details
  • Thanks Marc for such an assistance.. details
  • Thanks!. details
  • If someone could give me an example on how to loop through the 4 arrays and a System.out.println of the 'photo' value, that would be great!!. details
  • Looks like the URL_http://api.mongodb.org/java/2.6/com/mongodb/util/JSON.html# serialize%28java.lang.Object%29 [JSON] class has a method to serialize objects into JSON (as well as to go the URL_http://www.mkyong.com/mongodb/java- mongodb-convert-json-data-to-dbobject/ [other-way] and parse JSON to retrieve a DBObject).. details
  • My question is, is there a Java API that persists such big objects in Cassandra?After searching, MongoDB seems to perform this very well, but I want to know if it can be made in Cassandra via some API.. details
  • I'm not sure if nested arithmetic operations like the one above are supported.. details
  • Thanks in advance for any suggestion!!!. details
  • setId() still has to be ObjectId so Mongo (and its driver) can set the ID correctly.. details
  • Hopefully, the above will improve your understanding on how embedded documents may be updated in Mongo, and you will be able to accomplish what you need to do with Spring.. details
  • With the Java driver it would look like this: CODESNIPPET_JAVA3 .. details
  • The documentation on using the "$" operator to modify embedded documents may be found in the "The $ positional operator" section of the "Updating" documentation: URL_http://www.mongodb.org/display/DOCS/Updating#Updating- The%24positionaloperator [ URL_http://www.mongodb.org/display/DOCS/Updating Updating-The%24positionaloperator] There is more information on embedded documents in the "Dot Notation (Reaching into Objects)" Documentation: URL_htt p://www.mongodb.org/display/DOCS/Dot+Notation+%28Reaching+into+Objects%29 [ URL_http://www.mongodb.org/display/DOCS/Dot+Notation+%28Reaching+into+Objects%29 ] The above may be done in the Java Driver like so: CODESNIPPET_JAVA2 .. details
  • It is easy to make it work with URL_http://www.mongodb.org/display/DOCS/Java+Tutorial [java] and it has a nice mapper from java objects to mongo called URL_http://code.google.com/p/morphia/ [morphia] .. details
  • URL_http://www.mongodb.org/ [mongoDB] is easy to install and start to use document database for me.. details
  • Why would the database care abount the contents of the string.. details
  • If that is not attractive look URL_http://www.sitepen.com/blog/2008/07/16 /jsonquery-data-querying-beyond-jsonpath/ [here] and try JSONPath Lots of document databases out there like MongoDB and RavenDB etc use JSON as their format for storage.. details
  • Hey, yeah good idea, already done this one.... details
  • edit: the answer is easy here, but isn't in the documentation.. details
  • edit: the answer is easy here, but isn't in the documentation.. details
  • Anybody know which is the easy way to insert a json string in cassandra.Suppose I have a json string like this: {'key1':'val1','key2':'val2'} In MongoDB we can insert directly a json string like dbobj.insert(jsonstring);So is there any way to do like this in Cassandra?. details
  • Thanks though.. details
  • One thought that comes to mind is importing it into a database like MongoDb which already has support for importing JSON URL_http://www.mongodb.org/display/DOCS/Import+Export+Tools [ URL_http://www.mongodb.org/display/DOCS/Import+Export+Tools ] .. details
  • Good point (voted up:) ).. details
  • I need to communicate with MongoDB shell via Java To explain in short, I am using something like Runtime.exec (commons exec specifically) to call URL_http://www.mongodb.org/display/DOCS/Scripting+the+shell [MongoDB-shell-in eval-mode] Using this approach, I am able to successfully invoke MongoDB commands, retrieve the output into a stream (and print to stdout for example) All is well till this point.. details
  • If I store it in Mongo I have something kinda like this: CODESNIPPET_JAVA1 .. details
  • So I have a hierarchy of page objects and I am migrating from a Postgres System over to MongoDB, but I still need to support some legacy client systems which expect data in flat RDBMS style format.. details
  • And they expect it in a format like this: CODESNIPPET_JAVA2 .. details
  • plz check URL_https://github.com/mongodb/mongo-java-driver/downloads [mongo- java-driver] , i thank it should contain the same facilities also look at URL_https://github.com/michel-kraemer/bson4jackson [bson4jackson] .. details
  • i don't know about java mongo driver, but in URL_https://github.com/samus /mongodb-csharp [c#-mongo-driver] has BsonSerializer class.You can use it like following code: CODESNIPPET_JAVA1 .. details
  • BasicDBObject can't serialize a JSONArray--there seems to be no interoperability between these two hierarchies at all.. details
  • BasicDBObject can't serialize a JSONArray--there seems to be no interoperability between these two hierarchies at all.. details
  • My application uses JSON objects a lot (org.json.JSONArray and friends).. details
  • Thank you for the correction.. details
  • You could convert it to JSON using code like this: CODESNIPPET_JAVA4 .. details
  • If you have a flat data structure then it may be fine for you.. details
  • If keys are numbers and values are numbers then it can be very compact in binary.. details
  • If anyone would be interested please comment.. details
  • Also if you have a list of predefined keys then it's easy to use numbers for each of them.. details
  • Maybe try some binary format like the URL_http://www.faqs.org/rfcs/rfc3072.html [SDXF] (RFC 3072 Structured Data Exchange Format) or URL_http://bsonspec.org/ [BSON] (Binary JSON, a binary- encoded serialization of JSON-like documents) or roll your own binary format because removing quotes from JSON will not take you very far (maybe 1% for gzipped transfers at most).. details
  • If keys are numbers and values are numbers then it can be very compact in binary.. details
  • It's about half of the version without quotes and one third** of the version with quotes, and it's still easy to parse.. details
  • Now that I'm thinking about it I might add support for decimal fractions and make a CFON library.. details
  • And you can convert JSON to this small format using code like this: CODESNIPPET_JAVA5 .. details
  • Otherwise you just need to convert JSON to CODETERM1 and you can do this with URL_http://api.mongodb.org/java/current/com/mongodb/util/JSON.html#parse% 28java.lang.String%29 [JSON.parse()] method or any other JSON-mapping library like URL_http://jackson.codehaus.org/ [Jackson] .. details
  • we give mongoDB like query as a String to a function in Java driver for mongoDB as a String Object and an DBCursor Object is returned.. details
  • Thanks.. details
  • Something like: CODESNIPPET_JAVA1 .. details
  • Executing Mongo like Query (JSON)through Java.. details
  • The easiest way seems to be to use a JSON library to parse the JSON strings into a CODETERM1 and then use the URL_http://api.mongodb.org/java/2.0/org/ bson/BSONObject.html#putAll%28java.util.Map%29 [CODETERM2] method to put those values into a CODETERM3 .. details
  • But then again, I want to pick something that is quick an easy to work with, so I'm open to other solutions.. details
  • I'm leaning toward MongoDB because of more dynamic query capabilities, but am still considering CouchDB.. details
  • /} is not valid JSON, so I doubt you'll find any JSON parser/marshaller that will generate that.. details
  • Unfortunately, although you can convert JSON Objects to to DBObjects, Mongo can't handle JSONArrays, (sorry - should have made it clear that I'm using gson so I can make use of JSONArrays).. details
  • so i am send whole bunch of collection at same time, thats why i need store data, return from mongodb into one jsonstring, which still save in memory but less than what if store in java objects.. details
  • That does in fact work, though I wound up with a different solution.. details
  • Too bad the javadoc site is still down (due to AWS outage earlier today) :(.. details
  • Which line is it failing on?. details
  • I mean storing Json as an String field is not very useful, as it does not allow you to query or aggregate your data.. details
  • The constructors you are using in the Mongo Shell are JavaScript code that is obviously not part of strict JSON that you want to parse in your Java application.. details
  • This is for example discussed URL_http://stackoverflow.com/questions/18370206 /can-strict-json-dates-be-used-in-a-mongodb-query [here] .. details
  • json string 3 can work correctly in terminal but cannot be parsed by JSON.parse() method.On the contrary , json string 4 can be parsed by JSON.parse() method but cannot be used in terminal.I don't know the reason of these differences.. details
  • json string 1 can work correctly in terminal but cannot be parsed by JSON.parse() method.On the contrary , json string 2 can be parsed by JSON.parse() method but cannot be used in terminal.. details
  • In your particular case, your intent was to use string literals CODETERM1 and CODETERM2 , yet your data contained literals CODETERM3 and CODETERM4 instead, causing the logical problems you were observing.. details
  • Otherwise the garbage collector won't be so happy with this.. details
  • Also from my experience writing your own multi-threaded parser would speed things up drastically.. details
  • They are slow.. details
  • The problem This is where the problem starts.. details
  • The case So I'm trying to execute a query to a Mongo database using Java.. details
  • Importing using JAVA Driver API took around 3 hours, while using the following function (importing one BSON at a time): CODESNIPPET_JAVA2 .. details
  • I want to eliminate this field from the result.. details
  • Once received at the receiver we have to unmarshall it in memory.. details
  • resulted in the following error (on line CODETERM1 ): CODESNIPPET_JAVA3 .. details
  • I would like to add as well that decoding JSON into your native language objects and then saving it down without any real validation is just asking to be hacked, this is the worst method of destroying any kind of injection protection MongoDBs native querying offers.. details
  • Unfortunately I am not able to do so.. details
  • Hence same error again.. details
  • :" error.. details
  • :" error.. details
  • Even if I wanted to, writing a custom serializer for OtherClass would be extremely complex because it is an abstract root class.. details
  • If you want to limit the amount of objects returned (not surprisingly a whole collection could take a lot of memory), then you want to URL_http://docs.mongodb.org/ecosystem/tutorial/getting-started-with-java- driver/#getting-a-single-document-with-a-query [pass-the-query-details-into- the-find-method] to filter your results.. details
  • If you want to limit the amount of objects returned (not surprisingly a whole collection could take a lot of memory), then you want to URL_http://docs.mongodb.org/ecosystem/tutorial/getting-started-with-java- driver/#getting-a-single-document-with-a-query [pass-the-query-details-into- the-find-method] to filter your results.. details
  • Hopefully that's a little clearer!. details
  • I've seen a few hacks that work for very simple JSONArrays, but nothing that could be used on a more complex structure.. details
  • If you need to implement a "self-join" when using MongoDB then you may have structured your schema incorrectly (or sub-optimally).. details
  • The only way to do this would be via two simple queries, and not via map/reduce (which would be far more complex, unnecessary and the way you've written them wouldn't work as you can't query from within map function).. details
  • In MongoDB (and noSQL in general) the schema structure should reflect the queries you will need to run against them.. details
  • The only way to do this would be via two simple queries, and not via map/reduce (which would be far more complex, unnecessary and the way you've written them wouldn't work as you can't query from within map function).. details
  • I've bean looking at the CODETERM4 MongoDB driver object or using the GSON (Google) lib, but I am lacking the pattern for how to do this.. details
  • But to interop with the two, the low level String/Map format/parse interface is used, which I don't like either.. details
  • The frontend just needed the CODETERM4 even if it's empty that's no problem.. details
  • The frontend just needed the CODETERM4 even if it's empty that's no problem.. details
  • I'm desperately looking for a solution of building an arithmetic MongoDB query with java.. details
  • Error while converting Mongodb Date to Java Date.. details
  • You'll find the answer to your question in the source code of URL_https://github.com/mongodb/mongo/blob/master/src/mongo/db/jsobj.cpp [ URL_https://github.com/mongodb/mongo/blob/master/src/mongo/db/jsobj.cpp ] Which has the BSON to JSON conversion.. details
  • Leave a comment with why you are giving negative vote?. details
  • This is explained in the documentation on the "Update" command: URL_http://www.mongodb.org/display/DOCS/Updating#Updating- update%28%29 [ URL_http://www.mongodb.org/display/DOCS/Updating Updating update%28%29] Unfortunately, I am not familiar with the Spring framework, so I am unable to tell you how to do this with the "mongoOperations" class.. details
  • What I ended up doing was to shell out the mongo calls, obtain the result stream in java, JSONize the result (get rid of object_id since i dont need it, convert dates appropriately, etc.). details
  • The problem is that the import tool can only handle Json arrays (i.e.. details
  • The problem is that the import tool can only handle Json arrays (i.e.. details
  • com.mongodb.util.JSON has a method to parse a JSON string into DBObject.The default JSONCallback will return a BasicDBObject or BasicDBList according to input string.. details
  • Sorry I woke up late due to the day off :) Here is the function that I was talking about URL_http://api.mongodb.org/java/2.5.3/com/mongodb/DB.html eval.. details
  • The javadoc site for MongoDB is broken so I cant look it up, but lemme reply as soon as I can find it.. details
  • (Keep in mind that the handling of dangling commas is inconsistent between browsers eg.. details
  • Note::executeQuery() is not a built in function.. details
  • I wrote a gem called URL_http://github.com/olivernn/rackjson [Rack::JSON] for exactly this purpose, it acts as a basic REST interface to a MongoDB db.. details
Summaries the opinions about org.mongodb using topic modeling.
  • 0. driver mongo documentation database store find call 24positionaloperator updating notation: 15
    • I'm looking for a 'clean' answer to this as well.. details
    • But this again stores the value as CODESNIPPET .. details
    • The below URL says that this cannot be accomplished.. details
    • Its look like mongodriver create DataObject's objects, when call find method, so it will not help to convert dbcursor into json (which is possible by using serialize() method of com.mongodb.util.JSON class.. details
    • but none of them is working and I don't understand this MapReduce-thing well.. details
    • This seems to be a strange use case for MongoDB, it could be stored like this: CODESNIPPET .. details
    • I'm not sure if nested arithmetic operations like the one above are supported.. details
    • setId() still has to be ObjectId so Mongo (and its driver) can set the ID correctly.. details
    • The documentation on using the "$" operator to modify embedded documents may be found in the "The $ positional operator" section of the "Updating" documentation: The%24positionaloperator [ Updating-The%24positionaloperator There is more information on embedded documents in the "Dot Notation (Reaching into Objects)" Documentation: p://www.mongodb.org/display/DOCS/Dot+Notation+%28Reaching+into+Objects%29 [ The above may be done in the Java Driver like so: CODESNIPPET .. details
    • With the Java driver it would look like this: CODESNIPPET .. details
    • mongoDB is easy to install and start to use document database for me.. details
    • Why would the database care abount the contents of the string.. details
    • edit: the answer is easy here, but isn't in the documentation.. details
    • If I store it in Mongo I have something kinda like this: CODESNIPPET .. details
    • plz check mongo- java-driver] , i thank it should contain the same facilities also look at bson4jackson .. details
  • 1. query serialize dbobject xxx survey 28java driver util return create: 15
    • All my MongoDB query's are through Morphia to keep the code clean.. details
    • So if you think any kind of search will be useful, MongoDB might be an attractive option.. details
    • I tried initializing the string just before the query like this: CODESNIPPET .. details
    • In shell, the query I'm talking about looks like this: CODESNIPPET .. details
    • The query is put together in Java like so: CODESNIPPET .. details
    • Now here's some real magic for y'all!. details
    • Good question.. details
    • Any advice would be appreciated!. details
    • In a project I'm working on, at one point I read a query to mongodb from a string.. details
    • I am basically working on creating a restful API which produces surveys and consumes survey responses.. details
    • Thanks Marc for such an assistance.. details
    • Looks like the serialize%28java.lang.Object%29 [JSON] class has a method to serialize objects into JSON (as well as to go the mongodb-convert-json-data-to-dbobject/ [other-way] and parse JSON to retrieve a DBObject).. details
    • BasicDBObject can't serialize a JSONArray--there seems to be no interoperability between these two hierarchies at all.. details
    • we give mongoDB like query as a String to a function in Java driver for mongoDB as a String Object and an DBCursor Object is returned.. details
    • The easiest way seems to be to use a JSON library to parse the JSON strings into a ObjectId("XXX") and then use the bson/BSONObject.html#putAll%28java.util.Map%29 [CODETERM2] method to put those values into a /XXX/gi .. details
  • 2. request perform kind match http documentation query mongo format store: 9
    • cool... thanks for your reply.. details
    • Thanks for reply.. details
    • The procedure is simple: 1.. details
    • Well, this data was stored in RDMS in regular column-rows format, but in the process of sending it from one server to another we are marshalling it as JSON.. details
    • Is there any way how to solve it?Thanks a lot.. details
    • I want to log incoming HTTP request data for a survey application and later planning to analyze the data by performing various kind of "rule matching" on that request data.. details
    • So following are kind of queries i'll be performing Match HTTP Requests with Referer as major search engines.. details
    • It is easy to make it work with java and it has a nice mapper from java objects to mongo called morphia .. details
    • Otherwise you just need to convert JSON to DBObject and you can do this with 28java.lang.String%29 [JSON.parse()] method or any other JSON-mapping library like Jackson .. details
  • 3. binary format quote database simple mongo query lot jsonpath pojo: 13
    • The advantage of using MongoDB over simple JSON files is that, like any database, you can query your documents.. details
    • And when I say paging is the standard way of doing this, this applies to SQL databases as well as Mongo.. details
    • When I initialize it like that, Mongo doesn't escape the quotes and the query works.. details
    • I want it to be displayed like: CODESNIPPET .. details
    • To accomplish this, I created a very simple custom serializer: CODESNIPPET .. details
    • The POJO B has a lot of property members, so one idea was to make a simple proxy POJO and then Serialize.. details
    • This sounds like the case because the json data was stored in a RDBMS field.. details
    • If that is not attractive look /jsonquery-data-querying-beyond-jsonpath/ [here] and try JSONPath Lots of document databases out there like MongoDB and RavenDB etc use JSON as their format for storage.. details
    • And they expect it in a format like this: CODESNIPPET .. details
    • Maybe try some binary format like the SDXF (RFC 3072 Structured Data Exchange Format) or BSON (Binary JSON, a binary- encoded serialization of JSON-like documents) or roll your own binary format because removing quotes from JSON will not take you very far (maybe 1% for gzipped transfers at most).. details
    • And you can convert JSON to this small format using code like this: CODESNIPPET .. details
    • It's about half of the version without quotes and one third** of the version with quotes, and it's still easy to parse.. details
    • If keys are numbers and values are numbers then it can be very compact in binary.. details
  • 4. header save mongo email receiver insert standard sender custom util: 11
    • 2)Once the parsing is over, save the json Object in the Mongo Document.. details
    • ava.util.List) [ tml#insert(java.util.List) That said, it's not that much faster.. details
    • Then you can return it how ever you please.. details
    • It looks like you are assuming a collection of emails where each document has one sender and one receiver and now you want to find all senders who also happen to be receivers of email?. details
    • I want to treat standard headers like Referer,Cookie,URL etc as first class citizens for query the data later.. details
    • There are some standard headers with specific values, and there are some custom headers with custom values.. details
    • The reason I ask this is because I have thousands of documents in chunks and I may save time by not parsing data!. details
    • There are multiple tutorials like mongodb-insert-a-document/ [this] and with-java-and-mongodb-part-1/ [this] which describes saving JSON data using JSON.parse method which returns DBObject.. details
    • Can I not directly save my JSON string directly to Mongo without parsing, I see that the mongo shell can do that.. details
    • My application uses JSON objects a lot (org.json.JSONArray and friends).. details
    • Now that I'm thinking about it I might add support for decimal fractions and make a CFON library.. details
  • 5. query mongo shell dbobject binary standard utility text open execute: 6
    • Open the file as BINARY (not TEXT!). details
    • I would recommend to use mongo-shell-like-query utility (jar).. details
    • There seems to be a standard technique for converting JSON objects into DBObject i.e CODESNIPPET .. details
    • This works fine except that the id of the object is not included in the print-out of the object.. details
    • If you have a flat data structure then it may be fine for you.. details
    • Executing Mongo like Query (JSON)through Java.. details
  • 6. mongo driver idea point query hold result case dbobject location: 12
    • @Sam, That's useful information.. details
    • Otherwise you could just build a BasicDBObject with the new value.. details
    • But the result is like: CODESNIPPET .. details
    • Any idea how to add a location object ( which is an array holding double value) to the JSON object and thereby to the collection by converting the JSON object to a DBObject?. details
    • However, if you are working exclusively with JSON, you might want to investigate third party libraries like MongoJack - this uses the Java driver under the covers, but translates the results of your query directly into JSON for you.. details
    • My use cases : I use jackson as serialization when I need to save blobs to storage systems (Redis, Cassandra, Mongo, ... sometime mysql too).. details
    • In /#regular-expressions [Java] you have to use java.util.regex.Pattern like this: CODESNIPPET .. details
    • I want to basically store those headers in a meaningful way.. details
    • Hey, yeah good idea, already done this one.... details
    • Good point (voted up:) ).. details
    • i don't know about java mongo driver, but in /mongodb-csharp [c#-mongo-driver] has BsonSerializer class.You can use it like following code: CODESNIPPET .. details
    • Also if you have a list of predefined keys then it's easy to use numbers for each of them.. details
  • 7. match query request collection find read mongo http util case: 14
    • The most clean solution I found so far: use the build-in MappingMongoConverter of spring-data-mongodb.. details
    • What do you meant when you said: 'You should only do this if you never intended to query the json data, which is what Mongo is good at.?. details
    • I am now using java method com.mongodb.util.JSON.parse(param) to convert my json string to a DBObject.I find that, in most cases , for example , when the key in the json string is simple type like string or int ,it can be used by both JSON.parse() method and terminal.For example: CODESNIPPET .. details
    • Both JSON.parse({'times':8}) and db.collection.find({'times':8}) in terminal can work correctly.. details
    • Thank you all for reading!. details
    • I would be happy if someone can refer me to JSON format specification which is acceptable by MongoDB.. details
    • Actually i am sending a large collection to client, and if i convert documents of this collection into java object than it eat lot of memory, so if there a way to convert dbcursor direct to json string , or any other method which solve my problem.it will be great help.Thanks.. details
    • Just in case you are interested in using aggregation operators $max or $min, the following link provide details and sample code.. details
    • I've been using com.mongodb.util.JSON.parse(querystring) to read the query, which worked fine until I started reading queries that contained operators like $max and $min.. details
    • Match HTTP Match requests where URL param is some kind of regex Match HTTP Request Match requests where some Cookie and it's given value is present and list goes on.. What should a Morhpia model look like to achieve I described above ?. details
    • You should only do this if you never intended to query the json data, which is what Mongo is good at.. details
    • If someone could give me an example on how to loop through the 4 arrays and a System.out.println of the 'photo' value, that would be great!!. details
    • Hopefully, the above will improve your understanding on how embedded documents may be updated in Mongo, and you will be able to accomplish what you need to do with Spring.. details
    • I'm leaning toward MongoDB because of more dynamic query capabilities, but am still considering CouchDB.. details
  • 8. cassandra insert format system create import collection location store hold: 26
    • But take a look at MongoDB or CouchDB, which may actually be perfect for you.. details
    • Good, hope someone has a solution.. details
    • @brainOverflow That is what I thought was easy.. details
    • Thanks, though!.. details
    • It can hold any value, but in this example it contains the following elements: CODESNIPPET .. details
    • I have json file where each line looks like: CODESNIPPET .. details
    • Store multiple JSON documents (in row arrays format with nested JSON key-value objects) in MongoDB.. details
    • I am looking a way to insert a location value to a collection in MongoDB.. details
    • The issue here is the collection accepts the location in the form of an array which holds double value.. details
    • This is the easiest (and, I believe, most correct) way to do something like this.. details
    • Have a look at .. details
    • I was thinking about something like this: CODESNIPPET .. details
    • I'd like to do something like CODESNIPPET .. details
    • I am trying to create JSON query string for MongoDB, In order to support regular expression I need to create JSON string that has values without quotes.. details
    • Is there any way to accomplish this in java?. details
    • Thanks!. details
    • My question is, is there a Java API that persists such big objects in Cassandra?After searching, MongoDB seems to perform this very well, but I want to know if it can be made in Cassandra via some API.. details
    • Anybody know which is the easy way to insert a json string in cassandra.Suppose I have a json string like this: {'key1':'val1','key2':'val2'} In MongoDB we can insert directly a json string like dbobj.insert(jsonstring);So is there any way to do like this in Cassandra?. details
    • Thanks though.. details
    • One thought that comes to mind is importing it into a database like MongoDb which already has support for importing JSON .. details
    • So I have a hierarchy of page objects and I am migrating from a Postgres System over to MongoDB, but I still need to support some legacy client systems which expect data in flat RDBMS style format.. details
    • Thank you for the correction.. details
    • You could convert it to JSON using code like this: CODESNIPPET .. details
    • Something like: CODESNIPPET .. details
    • Thanks.. details
    • But then again, I want to pick something that is quick an easy to work with, so I'm open to other solutions.. details
  • 9. explain shell query mongo intend topic aggregation pipeline tujaxag6yt4 brain: 8
    • /#!topic/mongodb-user/TUjAxag6yT4 But still some part of my brain says there should be a way.. details
    • It also supports advance features such as aggregation pipeline.. details
    • I was inspired by this article .. details
    • Could somebody explain it to me please?. details
    • Thank you for your suggestion!!. details
    • Thanks in advance for any suggestion!!!. details
    • I need to communicate with MongoDB shell via Java To explain in short, I am using something like Runtime.exec (commons exec specifically) to call MongoDB-shell-in eval-mode] Using this approach, I am able to successfully invoke MongoDB commands, retrieve the output into a stream (and print to stdout for example) All is well till this point.. details
    • If anyone would be interested please comment.. details
  • 0. return util input accord dbobject jsoncallback basicdblist basicdbobject query aggregate: 3
    • I mean storing Json as an String field is not very useful, as it does not allow you to query or aggregate your data.. details
    • Otherwise the garbage collector won't be so happy with this.. details
    • com.mongodb.util.JSON has a method to parse a JSON string into DBObject.The default JSONCallback will return a BasicDBObject or BasicDBList according to input string.. details
  • 1. native injection mongodbs offer decode querying validation kind save real: 5
    • That does in fact work, though I wound up with a different solution.. details
    • This is for example discussed /can-strict-json-dates-be-used-in-a-mongodb-query [here] .. details
    • I would like to add as well that decoding JSON into your native language objects and then saving it down without any real validation is just asking to be hacked, this is the worst method of destroying any kind of injection protection MongoDBs native querying offers.. details
    • You'll find the answer to your question in the source code of Which has the BSON to JSON conversion.. details
    • Sorry I woke up late due to the day off :) Here is the function that I was talking about eval.. details
  • 2. query collection store return find mongo terminal result details filter: 16
    • so i am send whole bunch of collection at same time, thats why i need store data, return from mongodb into one jsonstring, which still save in memory but less than what if store in java objects.. details
    • Which line is it failing on?. details
    • /} is not valid JSON, so I doubt you'll find any JSON parser/marshaller that will generate that.. details
    • The constructors you are using in the Mongo Shell are JavaScript code that is obviously not part of strict JSON that you want to parse in your Java application.. details
    • They are slow.. details
    • The case So I'm trying to execute a query to a Mongo database using Java.. details
    • :" error.. details
    • Hence same error again.. details
    • Unfortunately I am not able to do so.. details
    • :" error.. details
    • If you want to limit the amount of objects returned (not surprisingly a whole collection could take a lot of memory), then you want to driver/#getting-a-single-document-with-a-query [pass-the-query-details-into- the-find-method] to filter your results.. details
    • Hopefully that's a little clearer!. details
    • If you need to implement a "self-join" when using MongoDB then you may have structured your schema incorrectly (or sub-optimally).. details
    • But to interop with the two, the low level String/Map format/parse interface is used, which I don't like either.. details
    • Error while converting Mongodb Date to Java Date.. details
    • I wrote a gem called Rack::JSON for exactly this purpose, it acts as a basic REST interface to a MongoDB db.. details
  • 3. aws outage javadoc early today site comment vote leave import: 4
    • Too bad the javadoc site is still down (due to AWS outage earlier today) :(.. details
    • The problem This is where the problem starts.. details
    • Leave a comment with why you are giving negative vote?. details
    • The problem is that the import tool can only handle Json arrays (i.e.. details
  • 4. query update foo bar literal write function case simple observe: 5
    • In your particular case, your intent was to use string literals foo and bar , yet your data contained literals "foo" and "bar" instead, causing the logical problems you were observing.. details
    • I've seen a few hacks that work for very simple JSONArrays, but nothing that could be used on a more complex structure.. details
    • The only way to do this would be via two simple queries, and not via map/reduce (which would be far more complex, unnecessary and the way you've written them wouldn't work as you can't query from within map function).. details
    • In MongoDB (and noSQL in general) the schema structure should reflect the queries you will need to run against them.. details
    • This is explained in the documentation on the "Update" command: update%28%29 [ Updating update%28%29] Unfortunately, I am not familiar with the Spring framework, so I am unable to tell you how to do this with the "mongoOperations" class.. details
  • 5. driver follow result function import bson importing hour time gson: 4
    • Importing using JAVA Driver API took around 3 hours, while using the following function (importing one BSON at a time): CODESNIPPET .. details
    • I want to eliminate this field from the result.. details
    • resulted in the following error (on line JSON.parse(JSONstr) ): CODESNIPPET .. details
    • I've bean looking at the BasicBSONList MongoDB driver object or using the GSON (Google) lib, but I am lacking the pattern for how to do this.. details
  • 6. result mongo shell call write jsonize appropriately dont rid stream: 4
    • Once received at the receiver we have to unmarshall it in memory.. details
    • Even if I wanted to, writing a custom serializer for OtherClass would be extremely complex because it is an abstract root class.. details
    • The frontend just needed the photos[] even if it's empty that's no problem.. details
    • What I ended up doing was to shell out the mongo calls, obtain the result stream in java, JSONize the result (get rid of object_id since i dont need it, convert dates appropriately, etc.). details
  • 7. build query solution function note arithmetic executequery structure simple jsonarrays: 2
    • I'm desperately looking for a solution of building an arithmetic MongoDB query with java.. details
    • Note::executeQuery() is not a built in function.. details
  • 8. jsonarrays terminal contrary find threaded site speed gson write thing: 6
    • Unfortunately, although you can convert JSON Objects to to DBObjects, Mongo can't handle JSONArrays, (sorry - should have made it clear that I'm using gson so I can make use of JSONArrays).. details
    • json string 1 can work correctly in terminal but cannot be parsed by JSON.parse() method.On the contrary , json string 2 can be parsed by JSON.parse() method but cannot be used in terminal.. details
    • json string 3 can work correctly in terminal but cannot be parsed by JSON.parse() method.On the contrary , json string 4 can be parsed by JSON.parse() method but cannot be used in terminal.I don't know the reason of these differences.. details
    • Also from my experience writing your own multi-threaded parser would speed things up drastically.. details
    • The javadoc site for MongoDB is broken so I cant look it up, but lemme reply as soon as I can find it.. details
    • (Keep in mind that the handling of dangling commas is inconsistent between browsers eg.. details
Summaries of the opinions about org.mongodb using three algorithms (Textrank, Lexrank and Luhn) adopted from extractive summarization. Each algorithm was used once for the positive opinions and once for the negative opinions.
  • If I store it in Mongo I have something kinda like this: CODESNIPPET JAVA1 .
  • I am now using java method com mongodb util JSON parse(param) to convert my json string to a DBObject I find that, in most cases , for example , when the key in the json string is simple type like string or int ,it can be used by both JSON parse() method and terminal For example: CODESNIPPET JAVA1 .
  • Looks like the serialize%28java lang Object%29 JSON class has a method to serialize objects into JSON (as well as to go the mongodb convert json data to dbobject other way and parse JSON to retrieve a DBObject) .
  • This seems to be a strange use case for MongoDB, it could be stored like this: CODESNIPPET JAVA1 .
  • You should only do this if you never intended to query the json data, which is what Mongo is good at .
  • You could convert it to JSON using code like this: CODESNIPPET JAVA4 .
  • And you can convert JSON to this small format using code like this: CODESNIPPET JAVA5 .
  • Actually i am sending a large collection to client, and if i convert documents of this collection into java object than it eat lot of memory, so if there a way to convert dbcursor direct to json string , or any other method which solve my problem it will be great help Thanks .
  • With the Java driver it would look like this: CODESNIPPET JAVA3 .
  • Anybody know which is the easy way to insert a json string in cassandra Suppose I have a json string like this: {'key1':'val1','key2':'val2'} In MongoDB we can insert directly a json string like dbobj insert(jsonstring);So is there any way to do like this in Cassandra?.
  • The easiest way seems to be to use a JSON library to parse the JSON strings into a ObjectId("XXX") and then use the bson BSONObject html#putAll%28java util Map%29 { "$oid" : "XXX" } method to put those values into a /XXX/gi .
  • My question is, is there a Java API that persists such big objects in Cassandra?After searching, MongoDB seems to perform this very well, but I want to know if it can be made in Cassandra via some API .
  • I am now using java method com mongodb util JSON parse(param) to convert my json string to a DBObject I find that, in most cases , for example , when the key in the json string is simple type like string or int ,it can be used by both JSON parse() method and terminal For example: CODESNIPPET JAVA1 .
  • Looks like the serialize%28java lang Object%29 JSON class has a method to serialize objects into JSON (as well as to go the mongodb convert json data to dbobject other way and parse JSON to retrieve a DBObject) .
  • Any idea how to add a location object ( which is an array holding double value) to the JSON object and thereby to the collection by converting the JSON object to a DBObject?.
  • Actually i am sending a large collection to client, and if i convert documents of this collection into java object than it eat lot of memory, so if there a way to convert dbcursor direct to json string , or any other method which solve my problem it will be great help Thanks .
  • However, if you are working exclusively with JSON, you might want to investigate third party libraries like MongoJack this uses the Java driver under the covers, but translates the results of your query directly into JSON for you .
  • I need to communicate with MongoDB shell via Java To explain in short, I am using something like Runtime exec (commons exec specifically) to call MongoDB shell in eval mode Using this approach, I am able to successfully invoke MongoDB commands, retrieve the output into a stream (and print to stdout for example) All is well till this point .
  • The documentation on using the "$" operator to modify embedded documents may be found in the "The $ positional operator" section of the "Updating" documentation: The%24positionaloperator Updating The%24positionaloperator There is more information on embedded documents in the "Dot Notation (Reaching into Objects)" Documentation: p: www mongodb org display DOCS Dot Notation %28Reaching into Objects%29 The above may be done in the Java Driver like so: CODESNIPPET JAVA2 .
  • Anybody know which is the easy way to insert a json string in cassandra Suppose I have a json string like this: {'key1':'val1','key2':'val2'} In MongoDB we can insert directly a json string like dbobj insert(jsonstring);So is there any way to do like this in Cassandra?.
  • The easiest way seems to be to use a JSON library to parse the JSON strings into a ObjectId("XXX") and then use the bson BSONObject html#putAll%28java util Map%29 { "$oid" : "XXX" } method to put those values into a /XXX/gi .
  • I am now using java method com mongodb util JSON parse(param) to convert my json string to a DBObject I find that, in most cases , for example , when the key in the json string is simple type like string or int ,it can be used by both JSON parse() method and terminal For example: CODESNIPPET JAVA1 .
  • Looks like the serialize%28java lang Object%29 JSON class has a method to serialize objects into JSON (as well as to go the mongodb convert json data to dbobject other way and parse JSON to retrieve a DBObject) .
  • Any idea how to add a location object ( which is an array holding double value) to the JSON object and thereby to the collection by converting the JSON object to a DBObject?.
  • Maybe try some binary format like the SDXF (RFC 3072 Structured Data Exchange Format) or BSON (Binary JSON, a binary encoded serialization of JSON like documents) or roll your own binary format because removing quotes from JSON will not take you very far (maybe 1% for gzipped transfers at most) .
  • Actually i am sending a large collection to client, and if i convert documents of this collection into java object than it eat lot of memory, so if there a way to convert dbcursor direct to json string , or any other method which solve my problem it will be great help Thanks .
  • Its look like mongodriver create DataObject's objects, when call find method, so it will not help to convert dbcursor into json (which is possible by using serialize() method of com mongodb util JSON class .
  • I need to communicate with MongoDB shell via Java To explain in short, I am using something like Runtime exec (commons exec specifically) to call MongoDB shell in eval mode Using this approach, I am able to successfully invoke MongoDB commands, retrieve the output into a stream (and print to stdout for example) All is well till this point .
  • The documentation on using the "$" operator to modify embedded documents may be found in the "The $ positional operator" section of the "Updating" documentation: The%24positionaloperator Updating The%24positionaloperator There is more information on embedded documents in the "Dot Notation (Reaching into Objects)" Documentation: p: www mongodb org display DOCS Dot Notation %28Reaching into Objects%29 The above may be done in the Java Driver like so: CODESNIPPET JAVA2 .
  • Anybody know which is the easy way to insert a json string in cassandra Suppose I have a json string like this: {'key1':'val1','key2':'val2'} In MongoDB we can insert directly a json string like dbobj insert(jsonstring);So is there any way to do like this in Cassandra?.
  • resulted in the following error (on line JSON.parse(JSONstr) ): CODESNIPPET JAVA3 .
  • json string 1 can work correctly in terminal but cannot be parsed by JSON parse() method On the contrary , json string 2 can be parsed by JSON parse() method but cannot be used in terminal .
  • json string 3 can work correctly in terminal but cannot be parsed by JSON parse() method On the contrary , json string 4 can be parsed by JSON parse() method but cannot be used in terminal I don't know the reason of these differences .
  • The constructors you are using in the Mongo Shell are JavaScript code that is obviously not part of strict JSON that you want to parse in your Java application .
  • The only way to do this would be via two simple queries, and not via map reduce (which would be far more complex, unnecessary and the way you've written them wouldn't work as you can't query from within map function) .
  • I mean storing Json as an String field is not very useful, as it does not allow you to query or aggregate your data .
  • I've seen a few hacks that work for very simple JSONArrays, but nothing that could be used on a more complex structure .
  • If you want to limit the amount of objects returned (not surprisingly a whole collection could take a lot of memory), then you want to driver #getting a single document with a query pass the query details into the find method to filter your results .
  • is not valid JSON, so I doubt you'll find any JSON parser marshaller that will generate that .
  • I'm desperately looking for a solution of building an arithmetic MongoDB query with java .
  • json string 1 can work correctly in terminal but cannot be parsed by JSON parse() method On the contrary , json string 2 can be parsed by JSON parse() method but cannot be used in terminal .
  • json string 3 can work correctly in terminal but cannot be parsed by JSON parse() method On the contrary , json string 4 can be parsed by JSON parse() method but cannot be used in terminal I don't know the reason of these differences .
  • The constructors you are using in the Mongo Shell are JavaScript code that is obviously not part of strict JSON that you want to parse in your Java application .
  • com mongodb util JSON has a method to parse a JSON string into DBObject The default JSONCallback will return a BasicDBObject or BasicDBList according to input string .
  • I would like to add as well that decoding JSON into your native language objects and then saving it down without any real validation is just asking to be hacked, this is the worst method of destroying any kind of injection protection MongoDBs native querying offers .
  • You'll find the answer to your question in the source code of Which has the BSON to JSON conversion .
  • I've bean looking at the BasicBSONList MongoDB driver object or using the GSON (Google) lib, but I am lacking the pattern for how to do this .
  • If you want to limit the amount of objects returned (not surprisingly a whole collection could take a lot of memory), then you want to driver #getting a single document with a query pass the query details into the find method to filter your results .
  • What I ended up doing was to shell out the mongo calls, obtain the result stream in java, JSONize the result (get rid of object id since i dont need it, convert dates appropriately, etc ).
  • This is explained in the documentation on the "Update" command: update%28%29 Updating update%28%29 Unfortunately, I am not familiar with the Spring framework, so I am unable to tell you how to do this with the "mongoOperations" class .
  • json string 1 can work correctly in terminal but cannot be parsed by JSON parse() method On the contrary , json string 2 can be parsed by JSON parse() method but cannot be used in terminal .
  • json string 3 can work correctly in terminal but cannot be parsed by JSON parse() method On the contrary , json string 4 can be parsed by JSON parse() method but cannot be used in terminal I don't know the reason of these differences .
  • The constructors you are using in the Mongo Shell are JavaScript code that is obviously not part of strict JSON that you want to parse in your Java application .
  • The only way to do this would be via two simple queries, and not via map reduce (which would be far more complex, unnecessary and the way you've written them wouldn't work as you can't query from within map function) .
  • I would like to add as well that decoding JSON into your native language objects and then saving it down without any real validation is just asking to be hacked, this is the worst method of destroying any kind of injection protection MongoDBs native querying offers .
  • Unfortunately, although you can convert JSON Objects to to DBObjects, Mongo can't handle JSONArrays, (sorry should have made it clear that I'm using gson so I can make use of JSONArrays) .
  • I've bean looking at the BasicBSONList MongoDB driver object or using the GSON (Google) lib, but I am lacking the pattern for how to do this .
  • If you want to limit the amount of objects returned (not surprisingly a whole collection could take a lot of memory), then you want to driver #getting a single document with a query pass the query details into the find method to filter your results .
  • so i am send whole bunch of collection at same time, thats why i need store data, return from mongodb into one jsonstring, which still save in memory but less than what if store in java objects .
  • This is explained in the documentation on the "Update" command: update%28%29 Updating update%28%29 Unfortunately, I am not familiar with the Spring framework, so I am unable to tell you how to do this with the "mongoOperations" class .
Summaries of the opinions about org.mongodb using Opinosis, an abstractive summarizer of opinions..
  • if you never intended to the json data , is what mongo is good at ? .
  • correctly in terminal but can be parsed by json parse (/( )/) method on the contrary .
Summaries of the opinions about org.mongodb using contrastive viewpoints. Each entry contains a pair of positive and negative sentences that are most likely discussing about similar API features.
    • In a project I'm working on, at one point I read a query to mongodb from a string .
    • I'm desperately looking for a solution of building an arithmetic MongoDB query with java .
Summaries of opinions about based on specific API aspects, such as, performance, usability, etc. The 'Overview' page provides an overview of the aspects detected in the opinions. The 'Trend' page shows the distribution of polarity over time for each aspect. The 'Positive Opinions' page groups positive opinions by the detected aspects. The 'Contrastive By Aspect' page shows paris of contrastive opinions under each aspect (where found).
Features:
  • Open the file as BINARY (not TEXT!)
  • Too bad the javadoc site is still down (due to AWS outage earlier today) :(.
Portability:
  • BasicDBObject can't serialize a JSONArray--there seems to be no interoperability between these two hierarchies at all.
  • N/A
Documentation:
  • URL_http://docs.mongodb.org/manual/reference/operator/max/ [ URL_http://docs.mongodb.org/manual/reference/operator/max/ ] Just in case you are interested in using aggregation operators $max or $min, the following link provide details and sample code.
  • If you want to limit the amount of objects returned (not surprisingly a whole collection could take a lot of memory), then you want to URL_http://docs.mongodb.org/ecosystem/tutorial/getting-started-with-java- driver/#getting-a-single-document-with-a-query [pass-the-query-details-into- the-find-method] to filter your results.
Community:
  • I'm not sure if nested arithmetic operations like the one above are supported.
  • N/A
Onlysentiment:
  • Thanks for reply.
  • Hopefully that's a little clearer!
Performance:
  • If keys are numbers and values are numbers then it can be very compact in binary.
  • They are slow.
Bug:
  • The issue here is the collection accepts the location in the form of an array which holds double value.
  • The problem This is where the problem starts.
Usability:
  • What do you meant when you said: 'You should only do this if you never intended to query the json data, which is what Mongo is good at.?
  • I mean storing Json as an String field is not very useful, as it does not allow you to query or aggregate your data.
  • Features: 26
    1. http: 1
      • I want to log incoming HTTP request data for a survey application and later planning to analyze the data by performing various kind of "rule matching" on that request data.. details
    2. string: 1
      • I tried initializing the string just before the query like this: CODESNIPPET_JAVA7 .. details
    3. database: 1
      • Why would the database care abount the contents of the string.. details
    4. general: 18
      • Now here's some real magic for y'all!. details
      • The query is put together in Java like so: CODESNIPPET_JAVA2 .. details
      • In shell, the query I'm talking about looks like this: CODESNIPPET_JAVA1 .. details
      • It can hold any value, but in this example it contains the following elements: CODESNIPPET_JAVA3 .. details
      • URL_http://api.mongodb.org/java/current/com/mongodb/DBCollection.html#insert(j ava.util.List) [ URL_http://api.mongodb.org/java/current/com/mongodb/DBCollection.h tml#insert(java.util.List)] That said, it's not that much faster.. details
      • Otherwise you could just build a BasicDBObject with the new value.. details
      • URL_https://groups.google.com/forum/#!topic/mongodb-user/TUjAxag6yT4 [ URL_https://groups.google.com/forum /#!topic/mongodb-user/TUjAxag6yT4] But still some part of my brain says there should be a way.. details
      • Have a look at URL_https://github.com/EqualExperts/mongo-shell-like-query [ URL_https://github.com/EqualExperts/mongo-shell-like-query ] .. details
      • Any advice would be appreciated!. details
      • I was thinking about something like this: CODESNIPPET_JAVA2 .. details
      • I want to basically store those headers in a meaningful way.. details
      • There are some standard headers with specific values, and there are some custom headers with custom values.. details
      • With the Java driver it would look like this: CODESNIPPET_JAVA3 .. details
      • If I store it in Mongo I have something kinda like this: CODESNIPPET_JAVA1 .. details
      • plz check URL_https://github.com/mongodb/mongo-java-driver/downloads [mongo- java-driver] , i thank it should contain the same facilities also look at URL_https://github.com/michel-kraemer/bson4jackson [bson4jackson] .. details
      • If anyone would be interested please comment.. details
      • Something like: CODESNIPPET_JAVA1 .. details
      • Executing Mongo like Query (JSON)through Java.. details
    5. json: 3
      • 2)Once the parsing is over, save the json Object in the Mongo Document.. details
      • Store multiple JSON documents (in row arrays format with nested JSON key-value objects) in MongoDB.. details
      • I have json file where each line looks like: CODESNIPPET_JAVA1 .. details
    6. file: 1
      • Open the file as BINARY (not TEXT!). details
    7. class: 1
      • I want to treat standard headers like Referer,Cookie,URL etc as first class citizens for query the data later.. details
  • Portability: 1
    1. general: 1
      • BasicDBObject can't serialize a JSONArray--there seems to be no interoperability between these two hierarchies at all.. details
  • Documentation: 5
    1. general: 5
      • URL_http://docs.mongodb.org/manual/reference/operator/max/ [ URL_http://docs.mongodb.org/manual/reference/operator/max/ ] Just in case you are interested in using aggregation operators $max or $min, the following link provide details and sample code.. details
      • I was inspired by this article URL_http://tebros.com/2011/07/using-mongodb-mapreduce-to-join-2-collections/ [ URL_http://tebros.com/2011/07/using-mongodb-mapreduce-to-join-2-collections/ ] .. details
      • There are multiple tutorials like URL_http://www.mkyong.com/mongodb/java- mongodb-insert-a-document/ [this] and URL_http://supundharmarathne.wordpress.com/2012/09/02/simple-crud-operations- with-java-and-mongodb-part-1/ [this] which describes saving JSON data using JSON.parse method which returns DBObject.. details
      • The documentation on using the "$" operator to modify embedded documents may be found in the "The $ positional operator" section of the "Updating" documentation: URL_http://www.mongodb.org/display/DOCS/Updating#Updating- The%24positionaloperator [ URL_http://www.mongodb.org/display/DOCS/Updating Updating-The%24positionaloperator] There is more information on embedded documents in the "Dot Notation (Reaching into Objects)" Documentation: URL_htt p://www.mongodb.org/display/DOCS/Dot+Notation+%28Reaching+into+Objects%29 [ URL_http://www.mongodb.org/display/DOCS/Dot+Notation+%28Reaching+into+Objects%29 ] The above may be done in the Java Driver like so: CODESNIPPET_JAVA2 .. details
      • edit: the answer is easy here, but isn't in the documentation.. details
  • Community: 1
    1. general: 1
      • I'm not sure if nested arithmetic operations like the one above are supported.. details
  • Onlysentiment: 14
    1. general: 14
  • Performance: 1
    1. general: 1
      • If keys are numbers and values are numbers then it can be very compact in binary.. details
  • Bug: 2
    1. general: 2
      • The issue here is the collection accepts the location in the form of an array which holds double value.. details
      • You should only do this if you never intended to query the json data, which is what Mongo is good at.. details
  • Usability: 86
    1. mapper: 1
      • It is easy to make it work with URL_http://www.mongodb.org/display/DOCS/Java+Tutorial [java] and it has a nice mapper from java objects to mongo called URL_http://code.google.com/p/morphia/ [morphia] .. details
    2. object: 1
      • This works fine except that the id of the object is not included in the print-out of the object.. details
    3. return: 1
      • Then you can return it how ever you please.. details
    4. marshalling: 1
      • Well, this data was stored in RDMS in regular column-rows format, but in the process of sending it from one server to another we are marshalling it as JSON.. details
    5. stream: 1
      • I need to communicate with MongoDB shell via Java To explain in short, I am using something like Runtime.exec (commons exec specifically) to call URL_http://www.mongodb.org/display/DOCS/Scripting+the+shell [MongoDB-shell-in eval-mode] Using this approach, I am able to successfully invoke MongoDB commands, retrieve the output into a stream (and print to stdout for example) All is well till this point.. details
    6. database: 1
      • URL_http://www.mongodb.org/ [mongoDB] is easy to install and start to use document database for me.. details
    7. arrays: 1
      • If someone could give me an example on how to loop through the 4 arrays and a System.out.println of the 'photo' value, that would be great!!. details
    8. list: 1
      • Also if you have a list of predefined keys then it's easy to use numbers for each of them.. details
    9. format: 1
      • And they expect it in a format like this: CODESNIPPET_JAVA2 .. details
    10. morphia: 1
      • All my MongoDB query's are through Morphia to keep the code clean.. details
    11. http: 2
      • So following are kind of queries i'll be performing Match HTTP Requests with Referer as major search engines.. details
      • Match HTTP Match requests where URL param is some kind of regex Match HTTP Request Match requests where some Cookie and it's given value is present and list goes on.. What should a Morhpia model look like to achieve I described above ?. details
    12. aggregation: 2
      • It also supports advance features such as aggregation pipeline.. details
      • URL_http://docs.mongodb.org/manual/reference/operator/max/ [ URL_http://docs.mongodb.org/manual/reference/operator/max/ ] Just in case you are interested in using aggregation operators $max or $min, the following link provide details and sample code.. details
    13. pojo: 1
      • The POJO B has a lot of property members, so one idea was to make a simple proxy POJO and then Serialize.. details
    14. general: 40
      • The most clean solution I found so far: use the build-in MappingMongoConverter of spring-data-mongodb.. details
      • So if you think any kind of search will be useful, MongoDB might be an attractive option.. details
      • Good, hope someone has a solution.. details
      • But take a look at MongoDB or CouchDB, which may actually be perfect for you.. details
      • I'm looking for a 'clean' answer to this as well.. details
      • @Sam, That's useful information.. details
      • @brainOverflow That is what I thought was easy.. details
      • And when I say paging is the standard way of doing this, this applies to SQL databases as well as Mongo.. details
      • Both JSON.parse({'times':8}) and db.collection.find({'times':8}) in terminal can work correctly.. details
      • The procedure is simple: 1.. details
      • When I initialize it like that, Mongo doesn't escape the quotes and the query works.. details
      • I want it to be displayed like: CODESNIPPET_JAVA4 .. details
      • But this again stores the value as CODESNIPPET_JAVA3 .. details
      • The below URL says that this cannot be accomplished.. details
      • I am looking a way to insert a location value to a collection in MongoDB.. details
      • This is the easiest (and, I believe, most correct) way to do something like this.. details
      • To accomplish this, I created a very simple custom serializer: CODESNIPPET_JAVA2 .. details
      • I would recommend to use mongo-shell-like-query utility (jar).. details
      • I've been using CODETERM1 to read the query, which worked fine until I started reading queries that contained operators like $max and $min.. details
      • In a project I'm working on, at one point I read a query to mongodb from a string.. details
      • It looks like you are assuming a collection of emails where each document has one sender and one receiver and now you want to find all senders who also happen to be receivers of email?. details
      • Is there any way how to solve it?Thanks a lot.. details
      • I was inspired by this article URL_http://tebros.com/2011/07/using-mongodb-mapreduce-to-join-2-collections/ [ URL_http://tebros.com/2011/07/using-mongodb-mapreduce-to-join-2-collections/ ] .. details
      • Could somebody explain it to me please?. details
      • I'd like to do something like CODESNIPPET_JAVA1 .. details
      • but none of them is working and I don't understand this MapReduce-thing well.. details
      • In URL_http://docs.mongodb.org/ecosystem/drivers/java-types /#regular-expressions [Java] you have to use CODETERM2 like this: CODESNIPPET_JAVA1 .. details
      • Is there any way to accomplish this in java?. details
      • I am basically working on creating a restful API which produces surveys and consumes survey responses.. details
      • This seems to be a strange use case for MongoDB, it could be stored like this: CODESNIPPET_JAVA1 .. details
      • setId() still has to be ObjectId so Mongo (and its driver) can set the ID correctly.. details
      • Hopefully, the above will improve your understanding on how embedded documents may be updated in Mongo, and you will be able to accomplish what you need to do with Spring.. details
      • edit: the answer is easy here, but isn't in the documentation.. details
      • i don't know about java mongo driver, but in URL_https://github.com/samus /mongodb-csharp [c#-mongo-driver] has BsonSerializer class.You can use it like following code: CODESNIPPET_JAVA1 .. details
      • BasicDBObject can't serialize a JSONArray--there seems to be no interoperability between these two hierarchies at all.. details
      • If keys are numbers and values are numbers then it can be very compact in binary.. details
      • It's about half of the version without quotes and one third** of the version with quotes, and it's still easy to parse.. details
      • Now that I'm thinking about it I might add support for decimal fractions and make a CFON library.. details
      • But then again, I want to pick something that is quick an easy to work with, so I'm open to other solutions.. details
      • I'm leaning toward MongoDB because of more dynamic query capabilities, but am still considering CouchDB.. details
    15. json: 24
      • The advantage of using MongoDB over simple JSON files is that, like any database, you can query your documents.. details
      • What do you meant when you said: 'You should only do this if you never intended to query the json data, which is what Mongo is good at.?. details
      • I am now using java method com.mongodb.util.JSON.parse(param) to convert my json string to a DBObject.I find that, in most cases , for example , when the key in the json string is simple type like string or int ,it can be used by both JSON.parse() method and terminal.For example: CODESNIPPET_JAVA1 .. details
      • I would be happy if someone can refer me to JSON format specification which is acceptable by MongoDB.. details
      • Any idea how to add a location object ( which is an array holding double value) to the JSON object and thereby to the collection by converting the JSON object to a DBObject?. details
      • However, if you are working exclusively with JSON, you might want to investigate third party libraries like URL_http://mongojack.org/ [MongoJack] - this uses the Java driver under the covers, but translates the results of your query directly into JSON for you.. details
      • Actually i am sending a large collection to client, and if i convert documents of this collection into java object than it eat lot of memory, so if there a way to convert dbcursor direct to json string , or any other method which solve my problem.it will be great help.Thanks.. details
      • Its look like mongodriver create DataObject's objects, when call find method, so it will not help to convert dbcursor into json (which is possible by using serialize() method of com.mongodb.util.JSON class.. details
      • There seems to be a standard technique for converting JSON objects into DBObject i.e CODESNIPPET_JAVA1 .. details
      • I am trying to create JSON query string for MongoDB, In order to support regular expression I need to create JSON string that has values without quotes.. details
      • You should only do this if you never intended to query the json data, which is what Mongo is good at.. details
      • This sounds like the case because the json data was stored in a RDBMS field.. details
      • Can I not directly save my JSON string directly to Mongo without parsing, I see that the mongo shell can do that.. details
      • There are multiple tutorials like URL_http://www.mkyong.com/mongodb/java- mongodb-insert-a-document/ [this] and URL_http://supundharmarathne.wordpress.com/2012/09/02/simple-crud-operations- with-java-and-mongodb-part-1/ [this] which describes saving JSON data using JSON.parse method which returns DBObject.. details
      • Looks like the URL_http://api.mongodb.org/java/2.6/com/mongodb/util/JSON.html# serialize%28java.lang.Object%29 [JSON] class has a method to serialize objects into JSON (as well as to go the URL_http://www.mkyong.com/mongodb/java- mongodb-convert-json-data-to-dbobject/ [other-way] and parse JSON to retrieve a DBObject).. details
      • If that is not attractive look URL_http://www.sitepen.com/blog/2008/07/16 /jsonquery-data-querying-beyond-jsonpath/ [here] and try JSONPath Lots of document databases out there like MongoDB and RavenDB etc use JSON as their format for storage.. details
      • Anybody know which is the easy way to insert a json string in cassandra.Suppose I have a json string like this: {'key1':'val1','key2':'val2'} In MongoDB we can insert directly a json string like dbobj.insert(jsonstring);So is there any way to do like this in Cassandra?. details
      • One thought that comes to mind is importing it into a database like MongoDb which already has support for importing JSON URL_http://www.mongodb.org/display/DOCS/Import+Export+Tools [ URL_http://www.mongodb.org/display/DOCS/Import+Export+Tools ] .. details
      • My application uses JSON objects a lot (org.json.JSONArray and friends).. details
      • You could convert it to JSON using code like this: CODESNIPPET_JAVA4 .. details
      • Maybe try some binary format like the URL_http://www.faqs.org/rfcs/rfc3072.html [SDXF] (RFC 3072 Structured Data Exchange Format) or URL_http://bsonspec.org/ [BSON] (Binary JSON, a binary- encoded serialization of JSON-like documents) or roll your own binary format because removing quotes from JSON will not take you very far (maybe 1% for gzipped transfers at most).. details
      • And you can convert JSON to this small format using code like this: CODESNIPPET_JAVA5 .. details
      • Otherwise you just need to convert JSON to CODETERM1 and you can do this with URL_http://api.mongodb.org/java/current/com/mongodb/util/JSON.html#parse% 28java.lang.String%29 [JSON.parse()] method or any other JSON-mapping library like URL_http://jackson.codehaus.org/ [Jackson] .. details
      • The easiest way seems to be to use a JSON library to parse the JSON strings into a CODETERM1 and then use the URL_http://api.mongodb.org/java/2.0/org/ bson/BSONObject.html#putAll%28java.util.Map%29 [CODETERM2] method to put those values into a CODETERM3 .. details
    16. result: 1
      • But the result is like: CODESNIPPET_JAVA3 .. details
    17. jackson: 1
      • My use cases : I use jackson as serialization when I need to save blobs to storage systems (Redis, Cassandra, Mongo, ... sometime mysql too).. details
    18. parsing: 1
      • The reason I ask this is because I have thousands of documents in chunks and I may save time by not parsing data!. details
    19. data: 2
      • So I have a hierarchy of page objects and I am migrating from a Postgres System over to MongoDB, but I still need to support some legacy client systems which expect data in flat RDBMS style format.. details
      • If you have a flat data structure then it may be fine for you.. details
    20. string: 1
      • we give mongoDB like query as a String to a function in Java driver for mongoDB as a String Object and an DBCursor Object is returned.. details
    21. cassandra: 1
      • My question is, is there a Java API that persists such big objects in Cassandra?After searching, MongoDB seems to perform this very well, but I want to know if it can be made in Cassandra via some API.. details
  • Features: 10
    1. json: 1
      • You'll find the answer to your question in the source code of URL_https://github.com/mongodb/mongo/blob/master/src/mongo/db/jsobj.cpp [ URL_https://github.com/mongodb/mongo/blob/master/src/mongo/db/jsobj.cpp ] Which has the BSON to JSON conversion.. details
    2. return: 1
      • so i am send whole bunch of collection at same time, thats why i need store data, return from mongodb into one jsonstring, which still save in memory but less than what if store in java objects.. details
    3. javadoc: 1
      • Too bad the javadoc site is still down (due to AWS outage earlier today) :(.. details
    4. stream: 1
      • What I ended up doing was to shell out the mongo calls, obtain the result stream in java, JSONize the result (get rid of object_id since i dont need it, convert dates appropriately, etc.). details
    5. general: 6
      • Which line is it failing on?. details
      • I want to eliminate this field from the result.. details
      • Once received at the receiver we have to unmarshall it in memory.. details
      • Leave a comment with why you are giving negative vote?. details
      • Sorry I woke up late due to the day off :) Here is the function that I was talking about URL_http://api.mongodb.org/java/2.5.3/com/mongodb/DB.html eval.. details
      • Note::executeQuery() is not a built in function.. details
  • Documentation: 2
    1. general: 2
      • If you want to limit the amount of objects returned (not surprisingly a whole collection could take a lot of memory), then you want to URL_http://docs.mongodb.org/ecosystem/tutorial/getting-started-with-java- driver/#getting-a-single-document-with-a-query [pass-the-query-details-into- the-find-method] to filter your results.. details
      • This is explained in the documentation on the "Update" command: URL_http://www.mongodb.org/display/DOCS/Updating#Updating- update%28%29 [ URL_http://www.mongodb.org/display/DOCS/Updating Updating update%28%29] Unfortunately, I am not familiar with the Spring framework, so I am unable to tell you how to do this with the "mongoOperations" class.. details
  • Onlysentiment: 1
    1. general: 1
      • Hopefully that's a little clearer!. details
  • Performance: 1
    1. general: 1
  • Bug: 9
    1. general: 9
      • The problem This is where the problem starts.. details
      • resulted in the following error (on line CODETERM1 ): CODESNIPPET_JAVA3 .. details
      • Hence same error again.. details
      • :" error.. details
      • :" error.. details
      • The only way to do this would be via two simple queries, and not via map/reduce (which would be far more complex, unnecessary and the way you've written them wouldn't work as you can't query from within map function).. details
      • The frontend just needed the CODETERM4 even if it's empty that's no problem.. details
      • Error while converting Mongodb Date to Java Date.. details
      • The problem is that the import tool can only handle Json arrays (i.e.. details
  • Usability: 30
    1. string: 1
      • In your particular case, your intent was to use string literals CODETERM1 and CODETERM2 , yet your data contained literals CODETERM3 and CODETERM4 instead, causing the logical problems you were observing.. details
    2. database: 1
      • The case So I'm trying to execute a query to a Mongo database using Java.. details
    3. javadoc: 1
      • The javadoc site for MongoDB is broken so I cant look it up, but lemme reply as soon as I can find it.. details
    4. rest: 1
      • I wrote a gem called URL_http://github.com/olivernn/rackjson [Rack::JSON] for exactly this purpose, it acts as a basic REST interface to a MongoDB db.. details
    5. general: 10
      • That does in fact work, though I wound up with a different solution.. details
      • This is for example discussed URL_http://stackoverflow.com/questions/18370206 /can-strict-json-dates-be-used-in-a-mongodb-query [here] .. details
      • Otherwise the garbage collector won't be so happy with this.. details
      • Also from my experience writing your own multi-threaded parser would speed things up drastically.. details
      • Unfortunately I am not able to do so.. details
      • I've seen a few hacks that work for very simple JSONArrays, but nothing that could be used on a more complex structure.. details
      • The only way to do this would be via two simple queries, and not via map/reduce (which would be far more complex, unnecessary and the way you've written them wouldn't work as you can't query from within map function).. details
      • The frontend just needed the CODETERM4 even if it's empty that's no problem.. details
      • I'm desperately looking for a solution of building an arithmetic MongoDB query with java.. details
      • (Keep in mind that the handling of dangling commas is inconsistent between browsers eg.. details
    6. filter: 1
      • If you want to limit the amount of objects returned (not surprisingly a whole collection could take a lot of memory), then you want to URL_http://docs.mongodb.org/ecosystem/tutorial/getting-started-with-java- driver/#getting-a-single-document-with-a-query [pass-the-query-details-into- the-find-method] to filter your results.. details
    7. json: 9
      • /} is not valid JSON, so I doubt you'll find any JSON parser/marshaller that will generate that.. details
      • Unfortunately, although you can convert JSON Objects to to DBObjects, Mongo can't handle JSONArrays, (sorry - should have made it clear that I'm using gson so I can make use of JSONArrays).. details
      • I mean storing Json as an String field is not very useful, as it does not allow you to query or aggregate your data.. details
      • The constructors you are using in the Mongo Shell are JavaScript code that is obviously not part of strict JSON that you want to parse in your Java application.. details
      • json string 3 can work correctly in terminal but cannot be parsed by JSON.parse() method.On the contrary , json string 4 can be parsed by JSON.parse() method but cannot be used in terminal.I don't know the reason of these differences.. details
      • json string 1 can work correctly in terminal but cannot be parsed by JSON.parse() method.On the contrary , json string 2 can be parsed by JSON.parse() method but cannot be used in terminal.. details
      • I would like to add as well that decoding JSON into your native language objects and then saving it down without any real validation is just asking to be hacked, this is the worst method of destroying any kind of injection protection MongoDBs native querying offers.. details
      • The problem is that the import tool can only handle Json arrays (i.e.. details
      • com.mongodb.util.JSON has a method to parse a JSON string into DBObject.The default JSONCallback will return a BasicDBObject or BasicDBList according to input string.. details
    8. interface: 1
      • But to interop with the two, the low level String/Map format/parse interface is used, which I don't like either.. details
    9. bson: 1
      • Importing using JAVA Driver API took around 3 hours, while using the following function (importing one BSON at a time): CODESNIPPET_JAVA2 .. details
    10. root: 1
      • Even if I wanted to, writing a custom serializer for OtherClass would be extremely complex because it is an abstract root class.. details
    11. gson: 1
      • I've bean looking at the CODETERM4 MongoDB driver object or using the GSON (Google) lib, but I am lacking the pattern for how to do this.. details
    12. schema: 2
      • If you need to implement a "self-join" when using MongoDB then you may have structured your schema incorrectly (or sub-optimally).. details
      • In MongoDB (and noSQL in general) the schema structure should reflect the queries you will need to run against them.. details