Added support to export to json