using System.Runtime.Serialization; using Newtonsoft.Json; namespace ShareeBike.Repository.Response { [DataContract] [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public class VersionindependentResponse { private CopriVersion _shareejson; /// Root element for versions 4.0 and older. [DataMember] public CopriVersion tinkjson { get; private set; } /// Root element from 4.1 and later. [DataMember] public CopriVersion shareejson { get => _shareejson ?? tinkjson; private set { _shareejson = value; } } } }