tradercentric commented on code in PR #2519:
URL: https://github.com/apache/avro/pull/2519#discussion_r1336121139
##########
lang/csharp/src/apache/main/Schema/Schema.cs:
##########
@@ -243,11 +244,28 @@ internal static Schema Parse(string json, SchemaNames
names, string encspace)
Schema sc = PrimitiveSchema.NewInstance(json);
if (null != sc) return sc;
+ // Refer to https://issues.apache.org/jira/browse/AVRO-3856
+ // Refer to https://github.com/JamesNK/Newtonsoft.Json/pull/2904
+ // Newtonsoft author advised to use JObject.Load/JArray.Load
instead of JObject.Parse()/JArray.Parse()
+ // The reason is we can set the MaxDepth property on the
JsonReader.
+ JsonReader reader = new JsonTextReader(new StringReader(json));
Review Comment:
Corrected in my fork.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]