Using JsonDocument property for models
Open
@xuzhg is already working on this.
Since May 3, 2022.
followup
question
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
I'm trying to leverage JsonDocument as part of dto classes and add ability to filter on such properties.
I'm facing two issues here:
- As I'm not using neither OdataController nor OData routing I don't need to provide EdmModel and thus I have no way to tell that my JsonDocument is an Open type which supports property access
- I have no way to intercept Expression building procedure in FilterBinder so I could convert dynamic property access to calls to JsonDocuments GetProperty().GetRawText() https://github.com/OData/AspNetCoreOData/blob/dad7c4cf04202a26e61b4e1517443ae9e81eb646/src/Microsoft.AspNetCore.OData/Query/Expressions/QueryBinder.cs#L299
Because obviously JsonDocument have no PropertyInfo (I even tried to wrap JsonDocument into DynamicObject)
Could someone suggest a proper way of doing this?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.