Updated encoding functionality to replace encoded character literals in json responses