3

I need a help on Json string (base 64) is getting truncated in request body where as it is working as expected in first http request and getting failed in 2nd http request onwards.

public class Base64Deserializer extends JsonDeserializer<Object> {

    @Override
    public Object deserialize(JsonParser parser, DeserializationContext context) throws IOException {
        String value = "";
        try {
            JsonNode node = parser.getCodec().readTree(parser);
            value = node.asText();
            System.out.println("in deserialize() :" + value);
            //ObjectMapper objectMapper = new ObjectMapper();
        } catch (Exception ex) {
            System.out.println("in deserialize() :: Exception");
            ex.printStackTrace();
        }
        return value;
    }
}

Here value is having complete base64 string in first http request but got truncated value in 2nd request on wards.

total length of base 64 string is more than 34K.

Please let me know what I can do to solve this problem. Thanks.

AMC
  • 2,642
  • 7
  • 13
  • 35

0 Answers0