format json and fix invalid syntax