json fields validation refactor to whitelist-based