add utility to clean up json