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.131 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.130 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.129 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.128 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.127 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.126 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.125 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.124 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.123 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.122 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.121 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.120 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.119 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.118 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.117 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.116 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.115 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.114 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.113 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.111 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs