small refactoring to JsonTools