Skip to main content

All Questions

Tagged with
1 vote
1 answer
69 views

Access nested objects in C#

I am trying to access specific properties from my object via Google Books API. The content is deserialized into two POCOs to access the nested object. I am stuck on is accessing the properties of ...
Juan21Guns's user avatar
0 votes
1 answer
51 views

Retrieve one object from a list of objects, but not by index[], but by a name of a field [duplicate]

At the end you can find the classes and Json file. How to retrieve one object from a list of objects, not by index[] but by a name of a field? I need to retrieve the full object. After I deserialize a ...
marcoqf73's user avatar
  • 1,324
-2 votes
2 answers
103 views

Want to access dynamic property name from dynamic object

I have following JSON format. { "data": [ { "id": 1, "variants": [ { "name": "Test", ...
Sami In's user avatar
  • 330
-1 votes
2 answers
52 views

How to output the values of List<int> from an object. (Not list of objects) C#

I am inputting information from a json file and then need to check that the information is correct. I am not sure how to print out the values of a List from an object. Not all objects have the same ...
new_to_coding's user avatar
-1 votes
1 answer
875 views

Unexpected character encountered while parsing value c# newtonsoft

I'm using C# with Newtonsoft library, the error i get is this Unexpected character encountered while parsing value: {. Path 'data', line 1, position 9. This is my result json from call var result = ...
0kkult0's user avatar
  • 17
0 votes
1 answer
100 views

c# Web API JSon combine Objects into Single Property

I am working on a Web API in C# and am getting my data from a SQL Database. When I put a single student number in the GET call, their data is return correctly, however if they have two rows in the SQL ...
GBM's user avatar
  • 139
-2 votes
1 answer
145 views

Build Dynamic fields to a defined Class in Runtime in C#

I have a class "Forecast": public class Forecast { public int Id { get; set; } public int Description{ get; set; } } In certain Case I add new fields for the Class Forecast depends on ...
MedAmin's user avatar
  • 35
0 votes
4 answers
233 views

Not able to parse the object in C# .NET

I am not able to parse the below object in C# .NET. I am getting parsing object error. messageBody (in String format - I am getting this below object in string format) { "Type" : "...
Hardik Parmar's user avatar
0 votes
0 answers
101 views

Why is the navigation page black after populating an object from a Json scan?

Good afternoon, My first time posting after using this website for years, so I apologize for formatting and probably a dumb question I can't find the answer for... I am scanning a QR Code that ...
mrhls2312's user avatar
0 votes
2 answers
742 views

How to dynamically handle changes in a JSON object name that may change regularly, when building C# class to deserialize the JSON? [closed]

my predicament is that I have to deserialize some JSON files provided by my company's software eng department, for me to use in a production environment, however some revisions of the JSON files have ...
Antonio Corneal's user avatar
0 votes
1 answer
549 views

Find all Id's in json object

I have a long tree json document, here is the part of it "childs": [ { "id": "id1", "name": "name1", "childs": [] }...
Alexey Savelyev's user avatar
-2 votes
1 answer
329 views

Convert JSON file into multiple class objects in C#

I'm trying to make a program in C# that allows me to edit level data in JSON: { "ambienceSettings": { "fogDDensity": 0.57235307, "skyHorizonColor": { ...
goteki's user avatar
  • 9
1 vote
1 answer
765 views

Change values in a JSON file C#

I have this code. How do I change the values of the JSON objects in code. "externalReference": "Integrator Reference", "proposalType": "Private Individual", ...
kieranm007's user avatar
0 votes
1 answer
44 views

How can I access my nested data using variables C#

I have a json file and I deserialised it as shown in the code below. Some context, dex is a robot and it has information such as battery and so on as shown in the json file below. I want to read the ...
ycyc's user avatar
  • 33
0 votes
2 answers
85 views

Json with data inconsistency

I got this strange API response from one external service: {emplooye: "Michael",age:"25",attachments:[{idAttachment: "23",attachmentPath:"C://Users/1"},{...
Matheus E's user avatar

15 30 50 per page
1
2 3 4 5
15