Added format json function