Orderful interview question

Write an API to convert documents between three different formats: EDI (string), XML and JSON