Dump to json done! Fully tested