Refactor code for building Json node using Json Util