Legal Notice
The opinions expressed herein are my own personal opinions and do not represent my employer’s view in anyway.Top Posts
- Create C# Class from SQL
- C# HttpClient POST or PUT Json with content type application/json
- Run tasks in parallel using .NET Core, C# and async coding
- C# get results from Task.WhenAll
- C# Get expiry timestamp from JWT token
- Using C# HttpClient from Sync and Async code
- ASP.Net Core API - "'s' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0."
Archive
Meta
Tag Archives: Newtonsoft
C# Newtonsoft camelCasing the serialized JSON output
JSON love to be camelCased, while the C# Model class hates it. This comes down to coding style, which is – among developers – taken more seriously than politics and religion. But fear not, with Newtonsoft (or is it newtonSoft … Continue reading
Posted in .net, .NET Core, c#, General .NET
Tagged CamelCasePropertyNamesContractResolver, Deserialization, JSON, JsonProperty, Newtonsoft, Serialization
Leave a comment
C# HttpClient POST or PUT Json with content type application/json
The HttpClient is a nifty tool for getting and sending data to a URL, but it works differently from the old fashioned WebRequest class. The content type is added to the post data instead of added as a header parameter. … Continue reading
Posted in .net, .NET Core, c#, General .NET
Tagged HttpClient, JSON, Newtonsoft, StringContent
2 Comments
C# Newtonsoft serialize property that is an array and a string
IdentityServer4 has a strange way of returning roles. If there is only one role, the property is a string: But if there is more than one role, the property is an array of strings: If the property is a string, … Continue reading
Azure CloudQueue, Get and Set Json using Newtonsoft.Json and Microsoft.WindowsAzure.Storage
The Microsoft Azure Cloud have a nice simple Queue mechanism in their Azure Storage where you can store up to 64 kb of data for up to 7 days. The queue is very easy to set up and very easy … Continue reading