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.90 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.89 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.88 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.87 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.86 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.85 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.84 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.83 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.82 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.81 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.80 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.79 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.78 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.77 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.76 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.75 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.74 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.73 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.72 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs
trackler-2.2.1.71 tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs