json cleanup