Strapi vs. MessagePack

If I try to receive a POST request with a body that is serialized with MessagePack (instead of JSON) I get an API error saying that it is not valid JSON. Is there any way to make Strapi work with MessagePack?

BTW encoding outgoing traffic with MessagePack was easy

/src/middlewares/messagepack.js

const msgpackr = require('msgpackr');

module.exports = () => {
    return async (ctx, next) => {
  
        await next();

        // Serialize 
        ctx.response.body = msgpackr.pack(ctx.response.body);
    };
  };

/src/api//routes/01-my-route.js

module.exports = {
    routes: [
        {
            method: 'GET',
            path: '/blabla',
            handler: 'score.getBlaBla',
            config: {
                middlewares: ['global::messagepack'],
            },
        },
    ]
}

Update

I can avoid the error error: invalid JSON, only supports object and array Error: invalid JSON, only supports object and array if I use the content type application/msgpack instead of application/json for the POST request.

Unfortunately I get a different error now:

error: Cannot read properties of undefined (reading 'data')
TypeError: Cannot read properties of undefined (reading 'data')

Update 2

The error mentioned above is related to the fact that if you make a request with application/msgpack the ctx.request.body will be empty. I asked about this here.