-
Notifications
You must be signed in to change notification settings - Fork 15
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
Change property resolution of To<TModel>() to align with Newtonsoft.Json convention #52
Comments
Hi @wingertge, using the attribute |
I didn't see that anywhere in the documentation so I didn't know about it. In general I find the documentation rather lacking, a simple list of functions with their signatures doesn't help all that much. Anyways, that would solve the issue. I still think it's odd that the To method doesn't do this by default though - especially since the driver already uses Newtonsoft.Json as a dependency. |
What documentation you're referring? We should take that into consideration to improve our docs for other users |
I'm talking about the docs available on the website. It doesn't really cover many of the common usecases. For example, deleting or updating a record based on a single index match is a pretty common usecase, but the only mention of delete/update is using a ref. I managed to somewhat figure it out with the Roslyn REPL and a local DB instance, but that kind of thing should be on the docs. That's really the main issue I meant. It could use more documentation on common real life use cases. |
Thanks for the feedback! I'll file a ticket internally to make the serialization/deserialization behavior match Newtonsoft.Json conventions a bit closer. I'll leave this ticket open to keep you updated on the progress. As far as the docs go:
|
The casing really is annoying. The driver expects the property name to match exactly the field name and in .NET, properties usually start with an uppercase. The workaround is simple, to use the It also annoys me that I can't deserialize into a generic |
This is a feature request. JSON convention says field names should start lowercase, while C# Properties start with an uppercase letter. Newtonsoft.Json converts the casing when serializing/deserializing, the FaunaDB driver should do so as well. Right now I either have to lowercase my model properties, or uppercase JSON fields, due to the lack of conversion (neither of which is a satisfactory solution).
The text was updated successfully, but these errors were encountered: