Translate xml documents into json and vice versa