refactor json related cls