MongoDB organization metadata stored as plain string

- Organization plugin - MongoDB adapter When adding custom metadata to an organization, it is stored as a JSON string in MongoDB. This mapping is unnecessary and suboptimal. While this behavior may be required for most database types, and so for the adapter, MongoDB natively supports JSON objects, and the metadata could be stored as such without stringifying it. Would it be acceptable to open a PR to improve this behavior for MongoDB specifically, or is this not worth pursuing?
{
"_id": {
"$oid": "6872e7e0d4a6f7bb8438b322"
},
"name": "test-org",
"slug": "test-org",
"createdAt": {
"$date": {
"$numberLong": "1752360928067"
}
},
"metadata": "{\"subscription\":{\"createdAt\":\"2025-07-13T14:56:52..." // should be an object
}
{
"_id": {
"$oid": "6872e7e0d4a6f7bb8438b322"
},
"name": "test-org",
"slug": "test-org",
"createdAt": {
"$date": {
"$numberLong": "1752360928067"
}
},
"metadata": "{\"subscription\":{\"createdAt\":\"2025-07-13T14:56:52..." // should be an object
}
1 Reply
Ping
Ping3mo ago
This is expected, we don't support json yet. However we will in the future

Did you find this page helpful?