make the options reference into valid JSON