DapperLib / DapperLib/Dapper

[Feature] DapperJson attribute

Open
#1,845 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
18.4k
Forks
3.7k
Avg merge
5h 8m
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reviewing related issue #688 and the existing Dapper mapping extension points, then define how the DapperJson attribute, enumerable JSON arrays, default .NET Core/5+ serialization, and configuration overrides should work; done means supported properties round-trip through database calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.