refactor, support json