Enable JSON middleware for JSON string fields
mainWhen working with database fields that store JSON strings, the API can treat them as structured objects. This allows for nested property access and updates (e.g., updating properties.model within a JSON field).
Note that JSON string fields cannot be partially updated; the entire JSON object must be provided. This middleware is disabled by default and must be enabled via the middlewares configuration setting.
// Example of a JSON field structure handled by the middleware
{
"id": 1,
"name": "Calculator",
"price": "23.01",
"properties": {
"depth": false,
"model": "TRX-120",
"width": 100,
"height": null
}
}