About the specifications of the JSON escape character
search cancel

About the specifications of the JSON escape character

book

Article ID: 101476

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

A control character is removed by Evaluate JSON Path Expression assertion when the input JSON object is containing the mixture of control character (0x01) and escaped character (\") as value string. Is it by design?

Environment

All supported versions of the API Gateway

Resolution

The use of control characters (U+0000 through U+001F) without escaping them is out of the specifications of JSON format (RFC8259). Removing or preserving control characters in the output string should not be assumed.
Please escape the control characters in the input JSON object before passing to Evaluate JSON Path Expression assertion.