groovy based, conversion script from obj to json