Dump Mongo Collection into JSON format

Mongo includes a mongoexport utility (see docs) which can dump a collection. This utility uses the native libmongoclient and is likely the fastest method. mongoexport -d <database> -c <collection_name> Also helpful: -o: write the output to file, otherwise standard output is used (docs) –jsonArray: generates a valid json document, instead of one json object per … Read more

Dumping a java object’s properties

You could try XStream. XStream xstream = new XStream(new Sun14ReflectionProvider( new FieldDictionary(new ImmutableFieldKeySorter())), new DomDriver(“utf-8”)); System.out.println(xstream.toXML(new Outer())); prints out: <foo.ToString_-Outer> <intValue>5</intValue> <innerValue> <stringValue>foo</stringValue> </innerValue> </foo.ToString_-Outer> You could also output in JSON And be careful of circular references šŸ˜‰

Migrate from Oracle to MySQL

Oracle does not supply an out-of-the-box unload utility. Keep in mind without comprehensive info about your environment (oracle version? server platform? how much data? what datatypes?) everything here is YMMV and you would want to give it a go on your system for performance and timing. My points 1-3 are just generic data movement ideas. … Read more