code reduction
output as json mime type
output well-formed json with mime type