clean up malformed JSON
alphabetize before publishing