All Questions

1376
votes
49answers
829979 views

Convert form data to JavaScript object with jQuery

How do I convert all elements of my form to a JavaScript object? I'd like to have some way of automatically building a JavaScript object from my form, without having to loop over each element. I do ...
709
votes
21answers
462399 views

Deserialize JSON into C# dynamic object?

Is there a way to deserialize JSON content into a C# 4 dynamic type? It would be nice to skip creating a bunch of classes in order to use the DataContractJsonSerializer.
2264
votes
22answers
652658 views

What is a serialVersionUID and why should I use it?

Eclipse issues warnings when a serialVersionUID is missing. The serializable class Foo does not declare a static final serialVersionUID field of type long What is serialVersionUID and why is...
344
votes
14answers
488875 views

How to Deserialize XML document

How do I Deserialize this XML document: <?xml version="1.0" encoding="utf-8"?> <Cars> <Car> <StockNumber>1020</StockNumber> <Make>Nissan</Make> ...
438
votes
11answers
308455 views

How do you do a deep copy of an object in .NET (C# specifically)?

I want a true deep copy. In Java, this was easy, but how do you do it in C#?
1111
votes
11answers
791710 views

Serializing to JSON in jQuery

I need to serialize an object to JSON. I'm using jQuery. Is there a "standard" way to do this? My specific situation: I have an array defined as shown below: var countries = new Array(); countries[0...
46
votes
3answers
18209 views

Deserializing polymorphic json classes without type information using json.net

This Imgur api call returns a list containing both Gallery Image and Gallery Album classes represented in json. I cant see how to deserialize these automatically using Json.NET given that there is no...
296
votes
16answers
225084 views

What is object serialization?

What is meant by "object serialization"? Can you please explain it with some examples?
112
votes
14answers
438601 views

Convert a JSON string to object in Java ME?

Is there a way in Java/J2ME to convert a string, such as: {name:"MyNode", width:200, height:100} to an internal Object representation of the same, in one line of code? Because the current method ...
439
votes
20answers
311791 views

How to make a class JSON serializable

How to make a Python class serializable? A simple class: class FileItem: def __init__(self, fname): self.fname = fname What should I do to be able to get output of: json.dumps() W...

Previous Next