json compare module refactor