Class GraphSONUtil
Provides helper methods for GraphSON serialization.
Inherited Members
Namespace: Gremlin.Net.Structure.IO.GraphSON
Assembly: Gremlin.Net.dll
Syntax
public static class GraphSONUtil
Methods
FormatTypeName(string, string)
Formats a type name with its prefix to a GraphSON TypeID.
Declaration
public static string FormatTypeName(string namespacePrefix, string typeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | namespacePrefix | The namespace prefix (default is "g"). |
| string | typeName | The name of the type. |
Returns
| Type | Description |
|---|---|
| string | The formatted TypeID. |
ToTypedValue(string, dynamic, string)
Transforms a value intos its GraphSON representation including type information.
Declaration
public static Dictionary<string, dynamic> ToTypedValue(string typename, dynamic value, string prefix = "g")
Parameters
| Type | Name | Description |
|---|---|---|
| string | typename | The name of the type. |
| dynamic | value | The value to transform. |
| string | prefix | A namespace prefix for the typename. |
Returns
| Type | Description |
|---|---|
| Dictionary<string, object> | The GraphSON representation including type information. |