Sha256: 240a4c0af08e62e480558a28fc755a312f7db214910a17ceeb0fb77e65ef1b7c

Contents?: true

Size: 672 Bytes

Versions: 123

Compression:

Stored size: 672 Bytes

Contents

using System;
using System.Reflection;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace Generators.Input
{
    public class CanonicalDataCasesJsonConverter : JsonConverter
    {
        public override bool CanConvert(Type objectType) => typeof(CanonicalDataCase[]).GetTypeInfo().IsAssignableFrom(objectType);

        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) 
            => CanonicalDataCasesJson.ToArray(JToken.ReadFrom(reader));

        public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) => throw new NotImplementedException();
    }
}

Version data entries

123 entries across 123 versions & 1 rubygems

Version Path
trackler-2.2.1.110 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.109 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.108 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.107 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.106 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.105 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.104 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.103 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.102 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.101 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.100 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.99 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.98 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.97 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.96 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.95 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.94 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.93 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.92 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.91 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs