refactor JsonParser class