File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,19 +8,19 @@ A fast JSON (de)serializer, built on [Sigil](https://github.com/kevin-montrose/S
88
99### Serializing
1010
11- ```
12- using(var output = new StringWriter())
13- {
14- JSON.Serialize(
15- new
16- {
17- MyInt = 1,
18- MyString = "hello world",
19- // etc.
20- },
21- output
22- );
23- }
11+ ``` C#
12+ using (var output = new StringWriter ())
13+ {
14+ JSON .Serialize (
15+ new
16+ {
17+ MyInt = 1 ,
18+ MyString = " hello world" ,
19+ // etc.
20+ },
21+ output
22+ );
23+ }
2424```
2525
2626There is also a ` Serialize ` method that returns a string.
@@ -37,11 +37,11 @@ types such as [ExpandoObject](http://msdn.microsoft.com/en-us/library/system.dyn
3737
3838### Deserializing
3939
40- ```
41- using(var input = new StringReader(myString))
42- {
43- var result = JSON.Deserialize<MyType>(input);
44- }
40+ ``` C#
41+ using (var input = new StringReader (myString ))
42+ {
43+ var result = JSON .Deserialize <MyType >(input );
44+ }
4545```
4646
4747There is also a ` Deserialize ` method that takes a string as input.
@@ -52,11 +52,11 @@ with an earlier "throw away" deserialization.
5252
5353### Dynamic Deserialization
5454
55- ```
56- using(var input = new StringReader(myString))
57- {
58- var result = JSON.DeserializeDynamic(input);
59- }
55+ ``` C#
56+ using (var input = new StringReader (myString ))
57+ {
58+ var result = JSON .DeserializeDynamic (input );
59+ }
6060```
6161
6262There is also a ` DeserializeDynamic ` method that works directly on strings.
You can’t perform that action at this time.
0 commit comments