Closed mselite closed 1 year ago
Hi @mselite , JsonPropertyName is a property that is recognized by System.Text.Json serializer.
The default serializer used by ArangoDBNetStandard is Json.NET (Newtonsoft.Json).
You can use JsonProperty to map ArangoDB attributes to C# properties. Example:
public class User
{
[JsonProperty("_id")]
public string Id { get; set; }
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("dob")]
public string DoB { get; set; }
}
I hope this helps.
Thanks @DiscoPYF for your help.
Happy to help 👍
I will close this issue now that your question is resolved. Feel free to open a new one if anything is not working as expected.
I would like to map my arangodb entities to my C# properties, as I am doing it with mongodb, but it didn't work. I am using Json seraialization library to do that. Here is an example:
Any one can help me? Thanks a lot.