skip to Main Content

Json – why are properties in my response object set to null?

I have this endpoint method: var authToken = await [url] .AddAuthHeaders(config) .PostJsonAsync(new AuthTokenRequest { GrantType = "test", ClientId = "test", ClientSecret = "test", Audience = "test" }) .ReceiveJson<AuthTokenResponse>(); It's calling this endpoint: [HttpPost] public IActionResult Get([FromBody] object request) { try…

VIEW QUESTION

Json – How to create a c# object and serialize it

In C# I want to created JSON String or Object with the format below: { "retailer_br_id" : "5473182", "retailer_external_id": "", "erp_invoice_number" : "INV-202302", "invoice_date": "2023-04-06T17:00:00.000Z", "status" : 1, "details":[{ "sku_external_id": "TD5015151432201", "quantity" : "2", "price_per_item": "14.5" }, { "sku_external_id": "000005020170898446",…

VIEW QUESTION

Azure – Grant-AzDiskAccess in c#

I'm writing a utility to move vms between 2 azure tenants. I'm developping it in C# as part of a larger project. Microsoft provides instructions in powershell: https://learn.microsoft.com/en-us/azure/virtual-machines/windows/disks-upload-vhd-to-managed-disk-powershell It seams pretty straightforward but I can't find how to get the…

VIEW QUESTION
Back To Top
Search