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.151 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.150 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.149 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.148 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.147 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.146 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.145 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.144 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.143 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.142 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.141 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.140 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.139 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.138 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.137 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.136 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.135 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.134 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.133 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.132 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs