[CSHARP-2432] Support snake naming convention for member keys Created: 06/Nov/18 Updated: 31/Mar/22 |
|
| Status: | Backlog |
| Project: | C# Driver |
| Component/s: | BSON |
| Affects Version/s: | 2.7.0 |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Kimi Arthur | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
There is a common naming convention called snake case. Basically for any property with name SnakeProperty, the corresponding json/bson key would be snake_property. Something like this: https://www.newtonsoft.com/json/help/html/NamingStrategySnakeCase.htm |
| Comments |
| Comment by Ian Whalen (Inactive) [ 17/Dec/18 ] |
|
Kimi_Arthur we don't plan to work on this any time soon, but in the mean time you can write your own convention based on the follow camel case example: https://github.com/mongodb/mongo-csharp-driver/blob/master/src/MongoDB.Bson/Serialization/Conventions/CamelCaseElementNameConvention.cs |