Broadcom API Gateway 11.x - String length constrain error while using Evaluate JSON v2 assertion
search cancel

Broadcom API Gateway 11.x - String length constrain error while using Evaluate JSON v2 assertion

book

Article ID: 440994

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

Using the Evaluate JSON v2 assertion on a JSON structure while retrieving a document,  customer encountered the following error: 

audit.details.last.fullText = {String} "Error occurred evaluating JSON Path: 'com.fasterxml.jackson.core.exc.StreamConstraintsException: String value length (20042219) exceeds the maximum allowed (20000000, from `StreamReadConstraints.getMaxStringLength()`)'"

Environment

API Gateway 11.x

Cause

This error occurs because Jackson library (v2.15+) limits the maximum size of a single JSON string value to prevent Denial of Service (DoS) attacks. The limit defaults to 20000000 characters/bytes. 

Resolution

In the API Gateway we do not expose the specific limit configuration to the system/cluster property level. Hence it cannot be changed.