Deserialization is the process by which an object is recreated from its serialized state.
Questions tagged [deserialization]
7954 questions
2
votes
1 answer
Can you serialize a vector of stuct's to TOML in rust?
Summary
I'm writing a program in rust and I would prefer use a TOML file to store a vector of struct's. However I can't figure out how to store a vector of struct's in a TOML file. I am able to do this using JSON but was hoping for TOML so just…

One
- 53
- 1
- 5
2
votes
2 answers
Deserialize JSON into an object (VB.NET)
I'm having an issue with getting some of the values from with this json string:
{
"kind": "shopping#products",
"etag": "\"YZWJaKE3MHROIW8rCIlu9mAACLM/6qxBB-GwuSPy5L3_zVS6sS2NYFI\"",
"id": "tag:google.com,2010:shopping/products",
"selfLink":…

Standage
- 1,517
- 7
- 22
- 41
2
votes
4 answers
Automatic post-deserialization execution
Suppose a simple class in C#:
[Serializable]
public class MyClass
{
public int A { get; set; }
public int B { get; set; }
[XmlIgnore]
public int Sum { get; }
}
This is deserialized from a simple XML file containing values for A and…

MPelletier
- 16,256
- 15
- 86
- 137
2
votes
0 answers
c# Deserializing xml to class "xmlns was not expected"
I want to deserialize a XML node to a class, with all the subnodes values into class properties
I got this error
ex {"There is an error in XML document (1, 2)."} System.Exception {System.InvalidOperationException}
and the message of the…

seergius96
- 86
- 7
2
votes
1 answer
Cannot deserialize the JSON object into 'MongoDB.Bson.BsonDocument' type
So I have a JSON file that I want to convert to an object that contains a BsonDocument but I get an error.
My JSON file is:
{
"words": {
"wordList": {
"d": "duck",
"t": "truck",
"l": "luck",
"s": "suck"
}
}
}
And…

Rafa
- 25
- 5
2
votes
2 answers
Serialization between client and server with different referenced versions
I have a windows service that references an assembly which contains the following class.
[Serializable]
public class User
{
public User(string userName)
{
UserName = userName;
}
public string…

Jay
- 2,644
- 1
- 30
- 55
2
votes
1 answer
jooq deserialize a polymorphic class
I am using JOOQ to manipulate the database,now i have a problem.
There is a polymorphic class OrderEntry
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", visible = true)
@JsonSubTypes(value =…

yiqianlingyihao
- 21
- 1
2
votes
2 answers
Jackson: deserialize missing field to Kotlin/Java List
I have the answer to my own question, so I post both the answer and solution, as explicitly encouraged by Jeff Atwood. My question was originally for Kotlin, but while trying to find a solution, I also tried Java, so I provide the question and…

Devabc
- 4,782
- 5
- 27
- 40
2
votes
3 answers
How to deserialize the generic response using Spring WebClient
I have a problem during the deserialization of a response. Let's suppose I have this response from third party using webclient .
Response :
{
"name":"FirstName",
"type":"Steel",
"Fee":{
"id":"1234",
"name":"FeeFirstName"
},
…

Kumar Kartikeya
- 75
- 1
- 9
2
votes
1 answer
How implement new `.getSerializable()` method to deserialize data into hashmap from saved instance bundle?
I was using bundle.getSerializable("data") as HashMap
but after changing sdkVersion to 33 .getSerializable() API is updated.
I am unable to implement it for HashMap
I tried -
savedInstanceState.getSerializable("answer",…

codegsaini
- 87
- 6
2
votes
1 answer
Can Java Serialization UID numbering start at 1
The vast majority of examples of a Java serialVersionUID I have seen has a very long long value - see for example here where the given example is static final long serialVersionUID = 10275539472837495L or even the documentation which gives an…

MrB
- 818
- 8
- 28
2
votes
1 answer
Deserializie multiple JSON Objects from file C#
I'm serializing Objects as JSON String in a .txt file with the following code:
private void ReserveTable_Click(object sender, EventArgs e)
{
Reservation CreateReservation = new Reservation(textBoxFirstName.Text,…

GasmaskTerror
- 21
- 3
2
votes
1 answer
kotlinx deserialization: different types && scalar && arrays
I'm trying to deserialize a JSON like this (much more complex, but this is the essential part):
[
{
"field": "field1",
"value": [1000, 2000]
},
{
"field": "field2",
"value": 1
},
{
"field":…

agathis
- 78
- 5
2
votes
3 answers
Flutter how to json decode with a string and a list
I've spent around an hour looking for this solution somewhere online. I'm new to flutter & dart languages but I'm very comfortable with C# and .net. Even tho dart/flutter use C# syntax a lot of the language feels much different than I thought it…

ThisQRequiresASpecialist
- 929
- 4
- 19
2
votes
1 answer
com.fasterxml.jackson.databind.JsonMappingException: Cannot invoke "java.lang.Boolean.booleanValue()" because "this.flag" is null
I'm trying to use Jackson in case to serialize and then deserialize an object. The object contains a field -> protected Serializable data
This is where the problem comes from - this data can come from a lot of components. That is why I'm trying to…

FIKI
- 31
- 3