change plain text responses with json responses