Month: October 2018
-
.NET Core 2.1 is Returning JSON with Lowercase Properties
Hi everyone, Just testing out .Net Core 2.1 and noticed that all of my JSON properties are being returned in lowercase despite being defined as uppercase. It turns out that this is configurable: // Change from this services.AddMvc(); // To this services .AddMvc() .AddJsonOptions(options => options.SerializerSettings.ContractResolver = new DefaultContractResolver()); Check out these links for more…
-
Parsing Hash Args for Cognito Auth – Javascript
Hi everyone, A quick post on a function for parsing hash args when using AWS Congito. //jsfiddle.net/4eo7836j/embed/ Just in case the fiddle ever disappears: const parseHashArgs = aURL => { aURL = aURL || window.location.href; var vars = {}; var hashes = aURL.slice(aURL.indexOf(‘#’) + 1).split(‘&’); for (var i = 0; i 1) { vars[hash[0]] =…