All Questions
100
questions
-1
votes
1
answer
98
views
C# Json.NET hide objects (not properties) when serializing
I want to hide objects (not properties) when serializing with Json.Net.
The situation is:
In a list of images, there are many images, including attributes such as Class, Name, and Layers. Within the ...
1
vote
1
answer
1k
views
C# Object - get properties from json within the object
My HTTP response data includes a field that is structured as a Dictionary<string,object>. Accessing the Object in debug mode shows me what I expect to see, i.e.
ValueKind = Object:
{ "...
0
votes
1
answer
61
views
Using a subset of an object in different services
lets say that I have a system that heavily relies on a single object, for example a Person.
I have a storage service (service 1) that handles basic CRUD operations for Person, and saves this person in ...
-1
votes
1
answer
103
views
how deserialize string pattern to object
I receive from tcpstream message with this format :
["bilbo,1,0,0,0,0,1,2022-11-21 19:06:10","mangnoune,1,0,0,0,0,2,2022-11-21 19:08:18"]
["string, int, int, float, float, ...
1
vote
1
answer
2k
views
How can we deserialize JSON data to c# object from API response
I need to deserialize my json data. I am using Newtonsoft.Json for json operations. I tried a lot of method to deserialize this data but i failed. Btw, I need to summarize my system for better ...
-1
votes
2
answers
532
views
c# Is there a way to determine if an object value is a base type like ints and strings or like class or structs
I want to make a serializer and to do this I have to check if the current object's type can hold multiple values. (What I mean by base type are Strings and Ints)
I know there are a lot of great ...
0
votes
0
answers
140
views
Type 'System.ComponentModel.Component' in Assembly 'is not marked as serializable
When I edit the winform UI design, and save them, an exception occurred.
Type 'System.ComponentModel.Component' in Assembly 'System,
Version=4.1.0.0, Culture=neutral, PublicKeyToken=null' is not ...
0
votes
1
answer
43
views
Pattern guidance serialised DTO and Generics
I am looking for some pointer into best pattern regarding the following objective.
I have multiple services that I would like to send Jobs but will contain meta data that will form separate object ...
1
vote
3
answers
1k
views
Serialize & Deserialize C# user Defined Classes in .Net
I m working with Core Web API and I have the challenge to nest different class objects into an ArrayList and send them over the FromBody object, the issue is I have to pack them in a way that on the ...
0
votes
1
answer
54
views
Identify type of dataFile while serializing/deserializing
I have a little problem. I want to deserialize a file from disk memory in c#. All is going very well! Actually, it even works! Except id like my code to be robust, so im testing what would happen if i ...
0
votes
1
answer
50
views
How to properly test for datatype when deserializing
Im trying to deserialize some objects with type Animal into a list. However i cant seem to figure out how to check that the deserialized object is in fact an animal. The codeexample is what i have. ...
0
votes
2
answers
648
views
Iterate through nested objects from json c#
I have received a Json file which I have to deal with. I have no idea over the structure. My goal is to deserialize the Json and write a function which allows me to iterate through all the given ...
0
votes
1
answer
69
views
Unable to read XML to object
I could use some help in reading this xml as an object in C#, the problem I have is with "ExtensionData" element, I can read everything in this xml except what's inside that element and I ...
0
votes
1
answer
209
views
Json having repeated key name in different node
I am working in json. In json data key is repeated in different node in single json. it is a response json. how can i make a serialized class for this json class.
In below json data is repeated is ...
-1
votes
1
answer
49
views
Unable to deseralize JSON String to a C# Object
Im trying to convert a JSON string retrived from https://my-json-server.typicode.com/dskato/UDLAProyectoApi/posts to a list of my "Customer" object
The data is coming good but when i try to ...