You’re building a RESTful microservice. Which would be a valid data format for returning data to the client?

Correct
Correct.They have a standard Content-Type that can be set on the response header and are text-based. It is usual to use JSON, but both XML and JSON are valid.