Json2CSharp / Json2CSharpCodeGenerator

Microsoft Reciprocal License
292 stars 81 forks source link

Generate json to python issue #108

Open chuongmep opened 9 months ago

chuongmep commented 9 months ago

Detail log : System.ArgumentOutOfRangeException: Length cannot be less than zero. (Parameter 'value') at System.Text.StringBuilder.set_Length(Int32 value) at Xamasoft.JsonClassGenerator.CodeWriters.PythonCodeWriter.WriteClassMembers(StringBuilder sw, JsonType type, String prefix) in C:\Users\Hilal\OneDrive\Desktop\Json2CSharpCodeGenerator\JsonClassGeneratorLib\CodeWriters\PythonCodeWriter.cs:line 152 at Xamasoft.JsonClassGenerator.CodeWriters.PythonCodeWriter.WriteClass(StringBuilder sw, JsonType type) in C:\Users\Hilal\OneDrive\Desktop\Json2CSharpCodeGenerator\JsonClassGeneratorLib\CodeWriters\PythonCodeWriter.cs:line 95 at Xamasoft.JsonClassGenerator.CodeWriters.PythonCodeWriter.WriteClassesToFile(StringBuilder sw, IEnumerable`1 types, Boolean rootIsArray) in C:\Users\Hilal\OneDrive\Desktop\Json2CSharpCodeGenerator\JsonClassGeneratorLib\CodeWriters\PythonCodeWriter.cs:line 122 at Xamasoft.JsonClassGenerator.JsonClassGenerator.GenerateClasses(String jsonInput, String& errorMessage) in C:\Users\Hilal\OneDrive\Desktop\Json2CSharpCodeGenerator\JsonClassGeneratorLib\JsonClassGenerator.cs:line 78