What is the difference between Serialization and Marshaling?

I know that in terms of several distributed techniques (such as RPC), the term “Marshaling” is used but don’t understand how it differs from Serialization. Aren’t they both transforming objects into series of bits? Related: What is Serialization? What is Object Marshalling? 13 s 13 Marshaling and serialization are loosely synonymous in the context of … Read more

Deserialize JSON into C# dynamic object?

Is there a way to deserialize JSON content into a C# dynamic type? It would be nice to skip creating a bunch of classes in order to use the DataContractJsonSerializer. 30 s 30 It’s pretty simple using Json.NET: dynamic stuff = JsonConvert.DeserializeObject(“{ ‘Name’: ‘Jon Smith’, ‘Address’: { ‘City’: ‘New York’, ‘State’: ‘NY’ }, ‘Age’: 42 … Read more

How do I turn a C# object into a JSON string in .NET?

I have classes like these: class MyDate { int year, month, day; } class Lad { string firstName; string lastName; MyDate dateOfBirth; } And I would like to turn a Lad object into a JSON string like this: { “firstName”:”Markoff”, “lastName”:”Chaney”, “dateOfBirth”: { “year”:”1901″, “month”:”4″, “day”:”30″ } } (Without the formatting). I found this link, … Read more

Serializing to JSON in jQuery [duplicate]

This question already has answers here: Serializing an object to JSON (3 answers) Closed 5 years ago. 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] = ‘ga’; … Read more

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 not want a string, as returned by $(‘#formid’).serialize();, nor do I want the map returned by $(‘#formid’).serializeArray(); 5 … Read more