Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用readme的测试代码报错 #7

Open
Antecer opened this issue Dec 28, 2019 · 0 comments
Open

使用readme的测试代码报错 #7

Antecer opened this issue Dec 28, 2019 · 0 comments

Comments

@Antecer
Copy link

Antecer commented Dec 28, 2019

我在.NetCore 3.1 测试了以下代码,IDE报错,无法推断JsonSerializer.ToObject的类型,请尝试显式指定类型.

string json = @"
                 /*注释*/
                {//注释  
                     /*注释*/""Name"" /*注释*/: /*注释*/""CMS"" /*注释*/,//注释
                    /*注释*/
                    ""Children"":[//注释
                                    1/*注释*/,
                                    2/*注释*/
                                ]//注释
                }//注释
                /*此处*/
                ";
var obj = JsonSerializer.ToObject(json);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant