File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
snippets/core/whats-new/whats-new-in-30/cs Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ public string WriteJSON()
16
16
Age = 18
17
17
} ;
18
18
19
- System . Console . WriteLine ( System . Text . Json . Serialization . JsonSerializer . ToString ( instance ) ) ;
19
+ System . Console . WriteLine ( System . Text . Json . JsonSerializer . Serialize ( instance ) ) ;
20
20
// </SnippetJsonSerialize>
21
21
22
- return System . Text . Json . Serialization . JsonSerializer . ToString ( instance ) ;
22
+ return System . Text . Json . JsonSerializer . Serialize ( instance ) ;
23
23
}
24
24
}
25
25
@@ -31,7 +31,7 @@ public class JsonPerson
31
31
public int Age { get ; set ; }
32
32
33
33
public static JsonPerson Parse ( string json ) =>
34
- System . Text . Json . Serialization . JsonSerializer . Parse < JsonPerson > ( json ) ;
34
+ System . Text . Json . JsonSerializer . Deserialize < JsonPerson > ( json ) ;
35
35
}
36
36
// </SnippetJsonDeserialize>
37
37
}
You can’t perform that action at this time.
0 commit comments