support json-mode