Skip to content

return multiple and JsonProperty / JsonPropertyName #434

@zweistein22

Description

@zweistein22

Having a simple query:

`var query = client.Cypher
.Match("(u:User {Sub: $sub})-[r:"+relationName+"]->(q:Query)")
.WithParam("sub",user.Sub)
.With("r,q")
.OrderByDescending("r.Time")
.Return((q,r) => new QueryHistoryReturn()
{
Query = q.As(),
RelationParams = r.As()
});

will return an empty Query object if Query is defined like this:

public class Query
{
[System.Text.Json.Serialization.JsonPropertyName("text")]
[Newtonsoft.Json.JsonProperty(PropertyName = "text")]
public string Text { get; set; }
}
`

Once I comment the the JsonProperty Attributes the above query returns the correct values.
Is this a bug?

P.S. Editor removes some symbols like "<"

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions