Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow mapping CLR types to JSON at the type mapper level #2568
Our current JSON support - both the older JSON.NET plugin and the newer System.Text.Json support introduced in #2306 - require you to manually specify
This is because our type mapping currently doesn't support a situation where more than one CLR type is mapped to the same PostgreSQL type.
Note: it will not be possible to have the user POCO returned by default when reading (i.e. without explicitly specifying it in GetFieldValue), since there's no way for us to distinguish between incoming JSON documents coming back from the database.
Another reason we need to allow mapping at the type mapper level, is in order to allow the user to specify JSON serialization options.
This is very related (and could be a dup of) #2439.