Export database to Json file