Add support for json-mode