Class GraphSONWriter
Allows to serialize objects to GraphSON.
Inherited Members
Namespace: Gremlin.Net.Structure.IO.GraphSON
Assembly: Gremlin.Net.dll
Syntax
public abstract class GraphSONWriter
Constructors
GraphSONWriter()
Initializes a new instance of the GraphSONWriter class.
Declaration
protected GraphSONWriter()
GraphSONWriter(IReadOnlyDictionary<Type, IGraphSONSerializer>)
Initializes a new instance of the GraphSONWriter class.
Declaration
protected GraphSONWriter(IReadOnlyDictionary<Type, IGraphSONSerializer> customSerializerByType)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyDictionary<Type, IGraphSONSerializer> | customSerializerByType | IGraphSONSerializer serializers identified by their Type. |
Fields
Serializers
Contains the information of serializers by type.
Declaration
protected readonly Dictionary<Type, IGraphSONSerializer> Serializers
Field Value
| Type | Description |
|---|---|
| Dictionary<Type, IGraphSONSerializer> |
Methods
ToDict(dynamic?)
Transforms an object into its GraphSON representation including type information.
Declaration
public dynamic? ToDict(dynamic? objectData)
Parameters
| Type | Name | Description |
|---|---|---|
| dynamic | objectData | The object to transform. |
Returns
| Type | Description |
|---|---|
| dynamic | A GraphSON representation of the object ready to be serialized. |
WriteObject(dynamic)
Serializes an object to GraphSON.
Declaration
public virtual string WriteObject(dynamic objectData)
Parameters
| Type | Name | Description |
|---|---|---|
| dynamic | objectData | The object to serialize. |
Returns
| Type | Description |
|---|---|
| string | The serialized GraphSON. |