Gremlinq.Extensions 14.2.0
Gremlinq.Extensions 14.2.0 is built against ExRam.Gremlinq 14.2.0. See the ExRam.Gremlinq 14.2.0 release notes for what changed there, TinkerPop 3.8 support above all. (#306)
Features
TinkerPop 3.8 in System.Text.Json
The System.Text.Json support in Gremlinq.Extensions.Support.SystemTextJson follows the server compatibility range that ExRam.Gremlinq 14.2.0 introduces, and writes and reads the same forms as Newtonsoft.
- Gremlinq.Extensions now depends on Gremlin.Net 3.8.2, through ExRam.Gremlinq. The requests, the answers and the public API stay the same. (#288)
- A
gx:OffsetDateTime, which a TinkerPop 3.8 server answersasDate()anddateAdd()with, is now read as aDateTimeOffsetthat keeps its offset. Before, it was moved to UTC or stayed a string. (#291) - For a server compatibility range from 3.8 on, a
DateTimeOffsetis written asgx:OffsetDateTimeinstead ofg:Date. (#293) - For a range from 3.8 on, a
gx:Byteis read as ansbyte, as Gremlin.Net 3.8 reads it. Below 3.8, and for a range that spans both, it stays abyte. (#292) - For a range from 3.8 on, strategies and strategy types are written as Gremlin.Net 3.8 writes them. Gremlin Server 3.8.2 cannot read the 3.7 form. (#298)
UseCosmosDbsets the server compatibility range to TinkerPop 3.4.13, the version CosmosDb understands, before a configured range is applied. No query changes. (#294)
Deserialization
- A
g:Mapor a plain object is now built into any dictionary class with a public parameterless constructor, such asSortedDictionary<,>,SortedList<,>or a class derived fromDictionary<,>, keys as they were typed. (#247) - A
ReadOnlyDictionary<,>and a class that implementsIDictionary<,>twice are now built, as Newtonsoft builds them. (#252) - A class that implements
IReadOnlyDictionary<,>but noIDictionary<,>is built again. 14.1.2 declined it. (#257) - A dictionary is also built through a constructor that takes an
IReadOnlyDictionary<,>, where only a constructor takingIDictionary<,>counted before. (#259) - A value requested as a generic interface of a scalar type, such as
IEquatable<int>orINumber<int>, is now read as that scalar type instead of being declined. (#251)
Fixes
- System.Text.Json no longer throws for input it cannot read, such as a number too large for the requested
intor anullvalue for aProperty<string>. It declines the value. A type of your own that derives fromProperty<T>is read likeProperty<T>, and aVertexProperty<T>gets its key. (#239) - A dictionary keeps a
nullvalue when its value type can hold one, from ag:Mapas from a plain object. It is a realnull, never aJsonElement. (#240) - A typed value such as a
g:Int32is no longer read as a dictionary of its@typeand@value. A collection of key-value pairs gets the same answer as aDictionary<string, object>, and a vertex read into a dictionary gives its properties. (#241)
Performance
- Typed
g:Treevalues are read faster: the tree converter reads them itself, without a detour through the typed-value converter per level. (#260)
Full changelog: https://github.com/Gremlinq/Gremlinq.Extensions/compare/14.1.2...14.2.0