Skip to content

Commit

Permalink
Increase max serilaization depth.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcweber committed Jun 10, 2024
1 parent 81c654a commit df11e97
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ public static class GremlinQueryEnvironmentExtensions
{
private static readonly byte[] GraphSon2Header = GetHeader("application/vnd.gremlin-v2.0+json");
private static readonly byte[] GraphSon3Header = GetHeader("application/vnd.gremlin-v3.0+json");
private static readonly JsonSerializerOptions JsonOptions = new() { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping };

private static readonly JsonSerializerOptions JsonOptions = new()
{
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
MaxDepth = 128
};

public static IGremlinQueryEnvironment AddGraphSonBinarySupport(this IGremlinQueryEnvironment environment) => environment
.AddGraphSonBinarySupport(new GraphSON2Writer(), GraphSon2Header, owner => new GraphSon2BinaryMessage(owner))
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
!application/vnd.gremlin-v3.0+json{"requestId":"00000000-0000-0000-0000-000000000000","op":"bytecode","processor":"traversal","args":{"gremlin":{"@type":"g:Bytecode","@value":{"step":[["inject",{"@type":"g:Int32","@value":0}],["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["constant",{"@type":"g:Int32","@value":1}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}},"aliases":{"g":"g"}}}
!application/vnd.gremlin-v3.0+json{"requestId":"00000000-0000-0000-0000-000000000000","op":"bytecode","processor":"traversal","args":{"gremlin":{"@type":"g:Bytecode","@value":{"step":[["inject",{"@type":"g:Int32","@value":0}],["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["constant",{"@type":"g:Int32","@value":1}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}},"aliases":{"g":"g"}}}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public Task MaxDepth()
{
return _g
.Inject(0)
.Map(GetLambda(13))
.Map(GetLambda(29))
.Verify();
}

Expand Down

0 comments on commit df11e97

Please sign in to comment.