Formats API out-JSON as per spec