Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit ddeb4e9

Browse files
committed
Use some C# 6
1 parent ad6ca7c commit ddeb4e9

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

src/ServiceStack.Text/JsonObject.cs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Collections.Generic;
33
using System.IO;
4-
using System.Text.RegularExpressions;
54
using ServiceStack.Text.Common;
65
using ServiceStack.Text.Json;
76

@@ -213,20 +212,10 @@ public JsonValue(string json)
213212
this.json = json;
214213
}
215214

216-
public T As<T>()
217-
{
218-
return JsonSerializer.DeserializeFromString<T>(json);
219-
}
215+
public T As<T>() => JsonSerializer.DeserializeFromString<T>(json);
220216

221-
public override string ToString()
222-
{
223-
return json;
224-
}
217+
public override string ToString() => json;
225218

226-
public void WriteTo(ITypeSerializer serializer, TextWriter writer)
227-
{
228-
writer.Write(json ?? JsonUtils.Null);
229-
}
219+
public void WriteTo(ITypeSerializer serializer, TextWriter writer) => writer.Write(json ?? JsonUtils.Null);
230220
}
231-
232221
}

src/ServiceStack.Text/JsonSerializer.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@
1111
//
1212

1313
using System;
14-
using System.Globalization;
1514
using System.IO;
1615
using System.Net;
1716
using System.Text;
1817
using ServiceStack.Text.Common;
1918
using ServiceStack.Text.Json;
20-
using ServiceStack.Text.Pools;
2119

2220
namespace ServiceStack.Text
2321
{

0 commit comments

Comments
 (0)