I need to store HTTP REST API (POST, GET, PATCH, etc.) requests and responses into a database entry (Column as BLOB), so that we can audit the requests and responses later.
As part of the incoming HTTP POST request, the DTO object is coming as request body. I can extract the JSON object as a request body.
How can I convert that JSON object to BLOB in Java?