Hi @tahir.manzoor
I am still having the error on my side.
Nuget package installed
image.png (24.2 KB)
The error I am getting:
image.png (45.1 KB)
It is running in Core 3.1
image.png (9.3 KB)
Please advise if you cannot replicate it as I am still having the issue
Also I removed the line for the document as it is not needed.
The code is simply:
var jop = new JsonDataLoadOptions();
jop.SimpleValueParseMode = JsonSimpleValueParseMode.Loose;
var json = new JsonDataSource("BuggyLoadJson.Json", jop);
//ensure compiler does not optimize away json var
Console.Write(json);
The stack trace from the error is the following:
Unhandled Exception: System.Data.DuplicateNameException: Cannot add a column named ‘Reviewer’: a nested table with the same name already belongs to this DataTable.
at System.Data.DataColumnCollection.RegisterColumnName(String name, DataColumn column)
at System.Data.DataColumnCollection.BaseAdd(DataColumn column)
at System.Data.DataColumnCollection.AddAt(Int32 index, DataColumn column)
at System.Data.XSDSchema.HandleElementColumn(XmlSchemaElement elem, DataTable table, Boolean isBase)
at System.Data.XSDSchema.HandleParticle(XmlSchemaParticle pt, DataTable table, ArrayList tableChildren, Boolean isBase)
at System.Data.XSDSchema.HandleComplexType(XmlSchemaComplexType ct, DataTable table, ArrayList tableChildren, Boolean isNillable)
at System.Data.XSDSchema.InstantiateTable(XmlSchemaElement node, XmlSchemaComplexType typeNode, Boolean isRef)
at System.Data.XSDSchema.HandleTable(XmlSchemaElement node)
at System.Data.XSDSchema.HandleParticle(XmlSchemaParticle pt, DataTable table, ArrayList tableChildren, Boolean isBase)
at System.Data.XSDSchema.HandleComplexType(XmlSchemaComplexType ct, DataTable table, ArrayList tableChildren, Boolean isNillable)
at System.Data.XSDSchema.InstantiateTable(XmlSchemaElement node, XmlSchemaComplexType typeNode, Boolean isRef)
at System.Data.XSDSchema.HandleTable(XmlSchemaElement node)
at System.Data.XSDSchema.HandleDataSet(XmlSchemaElement node, Boolean isNewDataSet)
at System.Data.XSDSchema.LoadSchema(XmlSchemaSet schemaSet, DataSet ds)
at System.Data.DataSet.InferSchema(XmlDocument xdoc, String[] excludedNamespaces, XmlReadMode mode)
at System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving)
at System.Data.DataSet.ReadXml(Stream stream)
at ? . (XmlDocument )
at ? .(String , Stream ,? )
at Aspose.Words.Reporting.JsonDataSource…ctor(String jsonPath, JsonDataLoadOptions options)
at BrokenJsonLoading.Program.Main(String[] args) in BugTrackingWithAspose\BrokenJsonLoading\Program.cs:line 18