-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON: Allow weakly-typed mapping via Dictionary #29825
Comments
Duplicate of #29427 |
Re-opening, since dictionary mapping was not covered by "primitive collections". |
Link to the "issue" should be in the docs at least, was difficult to find.. |
@vchirikov the milestone generally expresses whether an issue is planned for a given release or not. |
I assume this would also meant support for |
@onionhammer that would be a combination of this and #28871. |
@roji putting querying aside for now, JsonElement can already be saved/serialized as an entity property, but Dictionary<string, JsonElement> cannot; |
#28871 tracks weakly-typed JSON mapping via JsonDocument/JsonElement, where the JSON document schema varies and so a strongly-typed model isn't appropriate.
We can also allow simply mapping arbitrary Dictionary types - this corresponds to how many people use
Dictionary<string, object>
, to map an entire hierarchy. See #26903 on this (currently seemed blocked by property bag detection).OwnsOne(x => x.Json, builder => { builder.ToJson(); })
where x.Json is a Dictionary.The text was updated successfully, but these errors were encountered: