microsoft/teams.net

Public

mirrored fromhttps://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
affd7569cfa8bd4a83b86066b8636721ea186364

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

Libraries/Microsoft.Teams.Common/Json/TrueTypeJsonConverter.cs

24lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3
4using System.Text.Json;
5using System.Text.Json.Serialization;
6
7namespace Microsoft.Teams.Common.Json;
8
9/// <summary>
10/// JsonConverter that writes using the
11/// values concrete type
12/// </summary>
13public class TrueTypeJsonConverter<T> : JsonConverter<T> where T : notnull
14{
15 public override T? Read(ref Utf8JsonReader reader, Type type, JsonSerializerOptions options)
16 {
17 throw new NotImplementedException();
18 }
19
20 public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options)
21 {
22 JsonSerializer.Serialize(writer, value, value.GetType(), options);
23 }
24}