The code in this module could be a lot cleaner here if we weren't using the json builder. Is there a good reason to keep using the builder?