json conversion example
formatting and cleanup