This PR fixes a (sneaky) bug introduced in #25. XML strings were stringified before being returned to the client, producing invalid XML ("'<></>'" over "<></>"). This PR changes the code such that only JSON responses are stringified.