JSON import/export

Added support for importing and exporting JSON strings.