0

how to read all fields and their type of a mongo db collection using java? collection is as following. Each document may not have all fields

{ "_id" : { "oid" : "5117fa92f1d3a4093d0d3903"} },
{ "_id" : { "oid" : "5117fa93f1d3a4093d0d3904"} , "ip" : "127.0.0.1" },
{ "_id" : { "oid" : "5117fa93f1d3a4093d0d3904"} , "ip" : "127.0.0.1" ,"price" : 2000}
Naman Gala
  • 4,670
  • 1
  • 21
  • 55
javaLearner java
  • 109
  • 3
  • 17
  • possible duplicate of [MongoDB Get names of all keys in collection](http://stackoverflow.com/questions/2298870/mongodb-get-names-of-all-keys-in-collection) – Blakes Seven Sep 03 '15 at 06:45
  • And the link you are looking for in there is this: https://github.com/variety/variety . Implement in Java if you really must. – Blakes Seven Sep 03 '15 at 06:47

0 Answers0