Deserialization is the process by which an object is recreated from its serialized state.
Questions tagged [deserialization]
7954 questions
3
votes
1 answer
Set requried field while Deserializing using Json.Net
I have a class Foo as follows
public class Foo
{
public ClassA A {get;set;}
public string B {get;set;}
}
public class ClassA
{
public string C {get;set;}
}
When I get a Json string (say fooJson), I want to deserialize it to a Foo object…

KnightFox
- 3,132
- 4
- 20
- 35
3
votes
1 answer
Parsing a list of different JSON objects with Gson
How to parse below stream of Json objects?
There are example for array parsing but not stream of json objects. Only the first object is different other than that every other object is similar.
Its not array but stream of json objects.
[{
"code":…

Prakash S
- 632
- 6
- 11
3
votes
2 answers
Nested XML deserialization to c# gives null values
I have searched alot to find a solution, but couldn't come up with one after all.
So I hope that someone here can help me out.
I have an xml structure:
…

Vincent Verweij
- 85
- 1
- 8
3
votes
2 answers
Cannot properly memcpy a char array to struct
So I have a construct called packet
struct Packet {
unsigned int packet_type;
wchar_t packet_length[128];
wchar_t file_name[256];
wchar_t template_name[256];
wchar_t file_name_list[1024];
wchar_t file_data[1024];
void…

jacobsgriffith
- 1,448
- 13
- 18
3
votes
2 answers
How compare two objects with a lot of attributes in objective-c
I would like to test the deserialization of my object basket of type Basket which contains an array of objects of typeAProduct.
All of my product classes inherit from AProduct which is an abstract class.
Gradually, I will have more and more product…

Jean Lebrument
- 5,079
- 8
- 33
- 67
3
votes
1 answer
How to load Serialized Objects in Java by parts
I'm trying to serialize objects of big size in Java using Externalizable interface.
Code:
public class ResultsData implements Externalizable{
private static final long serialVersionUID = 1L;
private ArrayList results1;
…

JMRA
- 61
- 4
3
votes
1 answer
WebException.Status not serialized
When I run the test below (NUnit and VS2008 SP1) I get the following error
Expected: ConnectFailure
But was: UnknownError
Can anyone explain what I'm doing wrong?
[Test]
public void SerializationWebExceptionTest()
{
using (var stream = new…

sixeyes
- 483
- 3
- 14
3
votes
1 answer
JSON.Net constructor parameter missing when deserializing
I have a simple object that I'm roundtripping through JSON. It serializes just fine, but I deserialize it one of the values is set to the default value (0, in this particular case). Why is that?
Here's my object:
public class…

Brian Reischl
- 7,216
- 2
- 35
- 46
3
votes
1 answer
Intercept deserialization errors in WCF
I was recently asked by a security team if it was possible to change the message returned from deserialization issues within a WCF service. The error in question was when they intercepted the message and passed an integer that was outside the bounds…

Tom Fobear
- 6,729
- 7
- 42
- 74
3
votes
1 answer
Jackson inheritance and deserialization
I am writing an API on top of Spring Web MVC/Spring Hateoas and even if the deserialization of simple class hierarchy works like a charm, I cannot manage to deserialize Json input to the proper type using jackson.
Here is my class hierarchy…

Maxime
- 1,776
- 1
- 16
- 29
3
votes
2 answers
Deserializing an object, a value is not deserialized
This is my class:
namespace myclass
{
[Serializable]
public class BasicGameObject : GameObject
{
protected Shadow shadow_ = null;
protected bool shadow_enabled_ = false;
protected Dictionary…

Francesco Bonizzi
- 5,142
- 6
- 49
- 88
3
votes
1 answer
Using readonly fields in combination with serialization
When using read-only fields in a serializable class, that should not be serialized (or don't need to): How can they be restored? Assume the following piece of code:
[Serializable]
class SerializableClass
{
[NonSerialized]
private…

mvo
- 1,138
- 10
- 18
3
votes
1 answer
Python Deserialize ViewState
I am writing a program to decode edit and re-encode ViewState in python. I have successfully been able to find view state and decode the base64 encoded string, but became stuck trying to deserialize it. Is there a way to deserialize view state using…

735Tesla
- 3,162
- 4
- 34
- 57
3
votes
2 answers
Using Scala applicative to convert List[Object] to case class
I am writing a Scala Play Framework application that uses Datomic as a back-end database.
When I query Datomic, it returns "rows" as java.util.Lists of Lists of java.lang.Objects. For example:
[
[ "Joe", "1970-04-15" ],
[ "Mary", "1975-06-01"…

Ralph
- 31,584
- 38
- 145
- 282
3
votes
1 answer
Error while deserializing the JSON
I'm getting the JSON output as follows:
{"data":
[
{
"name":"followersQuery",
"fql_result_set":[{"subscriber_count":300}]
},
{
"name":"likesQuery",
"fql_result_set":[{"like_count":0}]
}
]
}
It is the output of multiple…

Dukhabandhu Sahoo
- 1,394
- 1
- 22
- 44