Comments (6)
Hi @wingertge, using the attribute FaunaField
to rename the field didn't solve your problem or this is not a possibility?
from faunadb-csharp.
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.
from faunadb-csharp.
What documentation you're referring? We should take that into consideration to improve our docs for other users
from faunadb-csharp.
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.
from faunadb-csharp.
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:
-
Right now, you're absolutely right. There's a gap between the pure reference documentation and our tutorials, which are a bit higher level. We're working on improving the docs, but in the meantime, if you haven't already, drop into our Gitter chat (https://gitter.im/fauna/Lobby) with questions.
-
We should be publishing csharp specific API documentation. I'll file a ticket to make sure we publish these.
from faunadb-csharp.
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 FaunaField
attribute with the proper casing... But this equally annoying and adds unnecessary clutter to the model.
I think that the matching should be case-insensitive, like Newtonsoft.Json
converter does by default (or System.Text.Json
).
It also annoys me that I can't deserialize into a generic Dictionary<string, object
- or haven't figured out how, yet.
from faunadb-csharp.
Related Issues (20)
- Blazor WASM : http calls to FaunaDb blocked by CORS policy HOT 1
- Need Fauna 101 sample HOT 6
- Fauna Query methods need intellisense hints HOT 4
- use System.Text.Json instead of Newtonsoft.Json ! HOT 2
- [C#] Decoding of custom type in array returns NULL values HOT 2
- EF Core support HOT 2
- Where is Create()??? I'm trying to create a document! HOT 1
- Unable to decode Dictionary<string, object> HOT 1
- Handle ResponseContent is not JSON
- [Bug] StringV is not castable to classes implementing ScalarValue<string>
- Example of user class serialization in README
- Having null properties on Entities without using FaunaField attribute makes Decoder.Decode throw exception HOT 1
- Support Enum
- Possibility for chaining style API? HOT 2
- Please support DateTimeOffset
- Package FaunaDB.Client 1.1.0 is not compatible with netcoreapp1.1 HOT 4
- HttpClient & TCP Connections HOT 1
- Feature Request: Encoder/Decoder Uri and similar types as a string HOT 1
- Nanosecond precision epoch ts on encoder and decoder HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faunadb-csharp.