Devbeat-io / devtoys-extensions

Devbeat provide a number of free to use extensions for Devtoys.
MIT License
0 stars 0 forks source link

bug: class arrays #4

Closed cloudfy closed 2 weeks ago

cloudfy commented 2 weeks ago

repro

type the following json:

{
    "name" : "sample"
    , "function" : [ 
        { 
            "name" : "abc"
        },
        {
            "name" : "def"
            , "valid": true
        }
     ]
}

becomes

public class Root
{
    public string Name { get; set; }
    public FunctionItem[] Function { get; set; }
    public FunctionItem FunctionItem { get; set; }
}

public class FunctionItem
{
    public string Name { get; set; }
    public bool Valid { get; set; }
}

should have been

public class Root
{
    public string Name { get; set; }
    public FunctionItem[] Function { get; set; }
}

public class FunctionItem
{
    public string Name { get; set; }
    public bool Valid { get; set; }
}
cloudfy commented 2 weeks ago

Solved with 1.1.0