Emanuele Sabellico created AVRO-3856:
----------------------------------------
Summary: Cannot customize MaxDepth when parsing Avro schema in C#
Key: AVRO-3856
URL: https://issues.apache.org/jira/browse/AVRO-3856
Project: Apache Avro
Issue Type: Bug
Components: csharp
Affects Versions: 1.11.2
Reporter: Emanuele Sabellico
When parsing the Avro Schema with Newtonsoft.Json max depth is limited to 64,
the default. It cannot be customized because it's using JObject.Parse that
doesn't allow to customize it.
Using JsonConvert can allow to change default MaxDepth
{code:c#}
JsonConvert.DefaultSettings = () =>
{
return new JsonSerializerSettings
{
MaxDepth = 100
};
};
var schema = File.ReadAllText("schema.avsc");
var json = JsonConvert.DeserializeObject<JObject>(schema);
{code}
[https://github.com/apache/avro/blob/41b3c08ca5da192786c2b08546e691b3126e1856/lang/csharp/src/apache/main/Schema/Schema.cs#L250]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)