Skip to content
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

[Feature] DapperJson attribute #1845

Open
tracker1 opened this issue Nov 7, 2022 · 0 comments
Open

[Feature] DapperJson attribute #1845

tracker1 opened this issue Nov 7, 2022 · 0 comments

Comments

@tracker1
Copy link

tracker1 commented Nov 7, 2022

Given that JSON strings are first class citizens in many modern databases, it would be nice, if there was an easy way to decorate a property using an attribute that would trigger JSON serialization/deserialization to/from database calls.

Note: this should handle enumerables as a JSON array, where objects will be the object structure. This should probably use the default json serialization for .Net Core/5+ with a minimal/default configuration, that can possibly be extended or overridden.

class Foo {
  [DapperJson]
  IEnumerable<Bar> somePropertyList { get; set; }

  [DapperJson]
  Bar someProperty { get; set; }
}

Related to #688

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant