Relative Content

Tag Archive for c#json

main.exe does not exist

It’s my first time asking for help here. When I try to compile the code I get the following errors. I’m using VS Code and sometimes, after a write more code, i get these errors. I have attached some screenshots with the two errors. I’m using C/C++: g++.exe when building my file.

How to convert a JSON into a TimeSpan c#

I’m having trouble converting a json into a timeSpan in C#, I have different json. Here are a few examples:
{ ‘seconds’: 60 } { ‘hours’: 11 } { ‘years: 5 }

Convert Json To Table Dynamically using C#

const jsonArray = [ { “name”: “John”, “age”: 30, “city”: “New York”, “cars”: [ { “name”: “Ford”, “models”: [“Fiesta”, “Focus”, “Mustang”] }, { “name”: “BMW”, “models”: [“320”, “X3”, “X5”] }, { “name”: “Fiat”, “models”: [“500”, “Panda”] } ], “address”: { “street”: “5th Avenue”, “number”: 10 } }, { “name”: “Jane”, “age”: 25, “city”: “San Francisco”, […]

C# Json Deserialize Dynamic Type

We have a C# Console Application that calls several 3rd party API’s. We get the data from these API’s back in JSON format. We are trying to deserialize the JSON into a defined class. The issue is that the ‘custom_attributes’ property in the json contains objects with the following structure: