Created
March 24, 2023 10:33
-
-
Save jskeet/08e6c670dc2998c2bc58bc2f7e6eb9b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Q75832457; | |
using System.Text.Json; | |
JsonSerializerOptions JsonSerializerOptions = new() | |
{ | |
PropertyNameCaseInsensitive = true | |
}; | |
string json = @" | |
[ | |
{ | |
""rawMessage"": ""adsfasf a\u00F6dsij\u00F6oi \u00F6jadf"", | |
""dateTime"": ""2023-03-24T10:04:05.6560707+01:00"", | |
""senderCompId"": ""BB"", | |
""targetCompId"": ""PRIOR"", | |
""targetSubId"": ""EMSX"", | |
""sent"": false | |
} | |
]"; | |
List<Message> messages = JsonSerializer.Deserialize<List<Message>>(json, JsonSerializerOptions); | |
Console.WriteLine(messages.Count); // Prints 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment