blob: 983e07d3e28c136d83fa7f3cb2f329d10b0b7ff2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Text;
using Jil;
namespace Benchmark.Serializers
{
public class JilSerializer : SerializerBase
{
public override object Serialize<T>(T input)
{
return Encoding.UTF8.GetBytes(Jil.JSON.Serialize(input, Options.ISO8601));
}
public override T Deserialize<T>(object input)
{
return Jil.JSON.Deserialize<T>(Encoding.UTF8.GetString((byte[])input), Options.ISO8601);
}
public override string ToString()
{
return "Jil";
}
}
}
|