Exception Posting JSON Request containing base 64 Encoded Binary File using FasterXML/jackson - Truncated Payload JSON String

unexpected end-of-input: was expecting closing quote for a string value
base64 padding
method threw com fasterxml/jackson-databind exc invaliddefinitionexception exception
json parse error: unexpected end-of-input in value_string
jackson exceptions
through reference chain
invalid json unexpected end of input in value_string
com fasterxml jackson-databind exc invalidformatexception cannot deserialize value of type

I am trying to post a base 64 encoded binary file as json using the following logic:

Approach A:

    this.mapper = new ObjectMapper(new JsonFactory().enable(JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS));
            final JsonParser parser = mapper.getFactory().createParser(jsonText);

//This next line is failing
            JsonNode jsonNode = mapper.readTree(parser);

Approach B:

//This next line is failing

JsonNode jsonNode = JsonLoader.fromString(jsonText);

But, no luck, I am getting:

Unexpected end-of-input: was expecting closing quote for a string value Exception message: com.fasterxml.jackson.core.io.JsonEOFException

Below is a cut of the field its failing on:

"base64EncodedFileBinary": "JVBERi0xLjYNJeLjz9MNCjIzIDAgb2JqDTw8L0xpbmVhcml6ZWQgMS9MIDYxMDE2L08gMjUvRSA1NTQ2OC9OIDEvVCA2MDUwOS9IIFsgNTc2IDE4MV0+Pg"

The string is processed when the length is reduced, but when the whole string is submitted to the API, it fails.

The payload is truncated after it exceeds a certain length.

Below is an payload printed out on invoking the API via Postman:

{
      "a": {
        "b": ["x"],
        "c": {
          "base64EncodedFileBinary": "x",
          "filename": "hello 749 world",
          "mimeType": ["application/pdf"],
          "hash": [{
            "encoding": "SHA256",
            "hash": "x"
          }]
        },
        "x": [
          {
            "base64EncodedFileBinary": "JVBERi0xLjYNJeLjz9MNCjIzIDAgb2JqDTw8L0xpbmVhcml6ZWQgMS9MIDYxMDE2L08gMjUvRSA1NTQ2OC9OIDEvVCA2MDUwOS9IIFsgNTc2IDE4MV0+Pg1lbmRvYmoNICAgICAgICAgICAgICAgICAgDQp4cmVmDQoyMyAxNA0KMDAwMDAwMDAxNiAwMDAwMCBuDQowMDAwMDAwOTI0IDAwMDAwIG4NC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ZtfNYcwqNRDyEpylNJSd9Re3AybwV6RNFUuxq3fmjp8YIisRX1LeGvppfzYgU0_zxS9PCwtcXXL8bcueCCsJ6qAngii_JZVSPDpqT_oT7moZkQ3I17SZIltCsaPm6tkJKR0QaO4aqSPjkkFHWjvxaWCCq0FO7Fr6MwipoLqaus_WXv9NcbCJkVo_aKYT0kCmqr5tRk5aWhCvokqjgWwxpmdH

The json is getting truncated before it gets to the Json Parser i.e. in the interceptor

 import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;


    import javax.annotation.Priority;
    import javax.ws.rs.WebApplicationException;
    import javax.ws.rs.container.ResourceInfo;
    import javax.ws.rs.core.Context;
    import javax.ws.rs.ext.Provider;
    import javax.ws.rs.ext.ReaderInterceptor;
    import javax.ws.rs.ext.ReaderInterceptorContext;
    import java.io.ByteArrayInputStream;
    import java.io.IOException;
    import java.io.InputStream;

    @Priority(value = 10)
    @Provider
    public class RestServerReaderInterceptor implements ReaderInterceptor {
        private static final Logger LOG = LoggerFactory.getLogger(RestServerReaderInterceptor.class);

        @Context
        private ResourceInfo resinfo;

        @Override
        public Object aroundReadFrom(ReaderInterceptorContext interceptorContext)
                throws IOException, WebApplicationException {
            InputStream inputStream = interceptorContext.getInputStream();
            byte[] bytes = new byte[inputStream.available()];
            inputStream.read(bytes);
            String requestContent = new String(bytes);
            LOG.info("RestServerReaderInterceptor aroundReadFrom requestContent= "+requestContent);

            try {

// THE JSON IS GETTING TRUNCATED BEFORE GETTING HERE

                if (!resinfo.getResourceMethod().getName().contains("Delete"))
                    new JsonValidator().isJsonValid(requestContent);


            } catch (SchemaValidationFailedException e) {


                throw new WebApplicationException(e);
            }

            LOG.info("RestServerReaderInterceptor aroundReadFrom END ");

            // Need to write back the Input content
            interceptorContext.setInputStream(new ByteArrayInputStream(requestContent.getBytes()));

            return interceptorContext.proceed();
        }
    }

POST Requests can be cut by server or browser, are you sure the whole message is submitted to your json deserializer ?

Base64 JsonMappingException: Unexpected end-of-input · Issue , Base64 JsonMappingException: Unexpected end-of-input #2183 however which creates a random byte array fails sporadically with jackson. Exception in thread "main" com.fasterxml.jackson.databind. other hand it is theoretically optional if length of encoded String is known. In Linked pull requests. parse_float, if specified, will be called with the string of every JSON float to be decoded. By default, this is equivalent to float(num_str). This can be used to use another datatype or parser for JSON floats (e.g. decimal.Decimal). parse_int, if specified, will be called

I don't think your code is properly reading the input stream. You are only issuing a single read call and basing it on the value returned by available. From the documentation on InputStream.available()

It is never correct to use the return value of this method to allocate a buffer intended to hold all data in this stream.

If you have access to commons-io you can replace this code with a simple IOUtils.toString

or you can lookup a simple implementation that usually looks something like

long count = 0; int n; while (-1 != (n = input.read(buffer))) { count += n; } return count;

This example is just for illustrative purposes as it does not do anything with the read data. I highly recommend you pull in commons-io to handle this for you. If you are really desperate and can't use a library you can always reference their source directly IOUtils as their license is very permissive.

Handling Base64-encoded binary data with Jackson, But what if you actually just want to encode or decode binary data to/from Base64​-encoded Strings, outside context of JSON processing? Turns  And it is not a good idea that you implement a separate module to transfer binary files, it will defeat the whole purpose of using json. I my self struggled a lot to find a good solution for this.

Yes, I got this working last night by replacing the :

InputStream inputStream = interceptorContext.getInputStream();
            byte[] bytes = new byte[inputStream.available()];
            inputStream.read(bytes);
            String requestContent = new String(bytes);

with

InputStreamReader reader = new InputStreamReader(interceptorContext.getInputStream(), com.google.common.base.Charsets.UTF_8);
        String requestContent = com.google.common.io.CharStreams.toString(reader);

The inherited code (from my colleague!) was reading, but truncating the json data.

Index (Jackson-core 2.10.0 API), Main factory method to use for constructing JsonFactory instances with different configuration: Buffer used for concatenating binary data that is either being encoded as base64 output, createJsonParser(File) - Method in class com.​fasterxml.jackson.core. Returns the raw request payload object i.e, either byte[] or String. I decided to write a quick blog post about this because much of the documentation and examples about this seems to be a bit scattered. What this achieves is the ability to upload any number of files with any other type of data in one request. For this example we’ll send up JSON data along with some files. File upload directive

API Gateway fixed issues, CVE-2018-2952, Issue: API Gateway used a Java version that contained from another application, it was possible to send a specially crafted binary payload that, Now, the com.fasterxml.jackson.dataformat has been updated to v2.7.8 to fix this Resolution: Previously, the XML to JSON filter failed if the XML encoding in  // / initialize this certificate from a supplied base-64 encoded binary // - will raise an EECCException if the supplied base64 is incorrect: constructor CreateFromBase64(const base64: RawUTF8); virtual; // / initialize this certificate from a set of potential inputs // - will first search from a .public file name, base-64 encoded binary,

Postman string escape, Currently the value supported is 'json'. in mvc application. In this article, you'll learn how to encode a string to Base64 encoded format. These are defined with the “groups” element in the request body. g. Response. jackson. String payload = "{\"message\" Postman Pat is a British stop-motion animated children's​  A note of caution: If you are wondering why json_encode() encodes your PHP array as a JSON object instead of a JSON array, you might want to double check your array keys because json_encode() assumes that you array is an object if your keys are not sequential.

Spring Boot Reference Documentation, Spring MVC Auto-configuration; HttpMessageConverters; Custom JSON multiple versions of various binary SDKs, including Groovy and the Spring Boot CLI. The @RestController annotation tells Spring to render the resulting string directly The Application.java file would declare the main method, along with the basic  nline base64, base64 decode, base64 encode, base64 converter, python, to text _decode decode image, javascript, convert to image, to string java b64 decode, decode64 , file to, java encode, to ascii php, decode php , encode to file js, _encode, string to text to decoder, url characters, atob javascript, html img, c# encode, 64 bit decoder, decode linuxbase decode

Comments
  • Why don't you use a different data format, like multipart, to send the file.
  • You are right, the payload is truncated .. I have updated the question with the truncated json string which was captured in the Json Validator class, which tries processing the json.
  • So you have to find out the correct configuration server side (tomcat, apache, etc) to let it go through.
  • the domain/configuration/domain.xml has max-post-size is set to max-post-size="157286400" and the payload size is 79.4 KB.
  • Thanks Deadron, you are right. I used Guava i.e. com.google.guava.