sharee.bike-App/SharedBusinessLogic/Repository/Response/VersionindependentResponse.cs

25 lines
597 B
C#
Raw Normal View History

2024-04-09 12:53:23 +02:00
using System.Runtime.Serialization;
using Newtonsoft.Json;
2021-06-26 20:57:55 +02:00
2024-04-09 12:53:23 +02:00
namespace ShareeBike.Repository.Response
2021-06-26 20:57:55 +02:00
{
2022-09-06 16:08:19 +02:00
[DataContract]
2024-04-09 12:53:23 +02:00
[JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)]
2022-09-06 16:08:19 +02:00
public class VersionindependentResponse
{
private CopriVersion _shareejson;
2021-06-26 20:57:55 +02:00
2022-09-06 16:08:19 +02:00
/// <summary> Root element for versions 4.0 and older. </summary>
[DataMember]
public CopriVersion tinkjson { get; private set; }
2021-06-26 20:57:55 +02:00
2022-09-06 16:08:19 +02:00
/// <summary> Root element from 4.1 and later. </summary>
[DataMember]
public CopriVersion shareejson
{
get => _shareejson ?? tinkjson;
private set { _shareejson = value; }
}
}
2021-06-26 20:57:55 +02:00
}