Class GraphSONReader
Allows to deserialize GraphSON to objects.
Inherited Members
Namespace: Gremlin.Net.Structure.IO.GraphSON
Assembly: Gremlin.Net.dll
Syntax
public abstract class GraphSONReader
Constructors
GraphSONReader()
Initializes a new instance of the GraphSONReader class.
Declaration
protected GraphSONReader()
GraphSONReader(IReadOnlyDictionary<string, IGraphSONDeserializer>)
Initializes a new instance of the GraphSONReader class.
Declaration
protected GraphSONReader(IReadOnlyDictionary<string, IGraphSONDeserializer> deserializerByGraphSONType)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyDictionary<string, IGraphSONDeserializer> | deserializerByGraphSONType | IGraphSONDeserializer deserializers identified by their GraphSON type. |
Fields
Deserializers
Contains the IGraphSONDeserializer instances by their type identifier.
Declaration
protected readonly Dictionary<string, IGraphSONDeserializer> Deserializers
Field Value
| Type | Description |
|---|---|
| Dictionary<string, IGraphSONDeserializer> |
Methods
ToObject(IEnumerable<JsonElement>)
Deserializes a GraphSON collection to an object.
Declaration
public virtual dynamic ToObject(IEnumerable<JsonElement> graphSonData)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<JsonElement> | graphSonData | The GraphSON collection to deserialize. |
Returns
| Type | Description |
|---|---|
| dynamic | The deserialized object. |
ToObject(JsonElement)
Deserializes GraphSON to an object.
Declaration
public virtual dynamic? ToObject(JsonElement graphSon)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonElement | graphSon | The GraphSON to deserialize. |
Returns
| Type | Description |
|---|---|
| dynamic | The deserialized object. |