Util fns for facilitating JSON responses.