using System;
using Newtonsoft.Json;

namespace Replikanto.converter
{
	public class GClass1 : JsonConverter<CompositeID>
	{
		public override CompositeID ReadJson(JsonReader reader, Type objectType, CompositeID existingValue, bool hasExistingValue, JsonSerializer serializer)
		{
			try
			{
				return CompositeID.Create((string)reader.Value);
			}
			catch
			{
			}
			return null;
		}

		public override void WriteJson(JsonWriter writer, CompositeID value, JsonSerializer serializer)
		{
			writer.WriteValue(Delegate32.smethod_0("{0}", value, Delegate32.delegate32_0));
		}

		internal static object smethod_0(object object_0)
		{
			return CompositeID.Create(object_0);
		}

		internal static void smethod_1(object object_0, object object_1)
		{
			object_0.WriteValue(object_1);
		}

		internal static void smethod_2()
		{
		}

		internal static void smethod_3()
		{
		}
	}
}
