serialization

Long/multiple SQL queries vs Serialization

I'm trying to improve the performance of my web app where a page does a long query to pull data from different tables on a database. It pulls invoice data with multiple item lines, invoice status, and with each line having additional properties from another table. Is serialization worth considering for improvement? The tables are relate...

JSON Serialization error

I am getting a error message, when I am trying to get a webservice response as json to jquery, "Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property." when i searched in the net, I could see some web.config settings for maxJsonLe...

WCF AddServiceReference causing custom tool error, not producing proxy

A problem with "Add Service Reference", and actually with SvcUtil over all its features. In order to reproduce you just need to add an OperationContract with argument or returning the following class : [XmlSchemaProvider("MySchema")] public class MyStructure : IXmlSerializable { private XmlElement e; private static void Func(ob...

Changing type of a field in C# at runtime

Hi, I have an existing heirarchy of classes, say something like this: Business - Division - ProjectTeam - Employee These classes are instantiated via deserialization. However, now I need to expose extra fields in the Employee for a particular user of the library i.e. say something like this: SpecialBusiness (extends Bus...

WCF: Serialize complex objects with read-only members

Hey Folks, Looking for some guidance on a WCF service I’m prototyping. I have a WCF service hosted in IIS that will pass data to my clients. I have a separate shared assembly that contains all my business objects that is referenced in my WCF project. I want to have a few of the properties in these business objects read only as I don’t...

Serialize Strings, ints and floats to character arrays for networking WITHOUT LIBRARIES

Hello StackOverflow, I want to transmit data over the network, but I don't want to use any foreign libraries (Standard C/C++ is ok). for example: unsigned int x = 123; char y[3] = {'h', 'i', '\0'}; float z = 1.23f; I want this in an char xyz[11]; array. Note: To transmit it over network, I need Network Byte order for the unsigne...

How to remove xmlns and z:Id z:Type after serialize with NetDataContractSerializer

After NetDataContractSerializer.Serialize (), the xml content contains extra information such as xmlns, z:Id, z:Type, z:Assembly, etc. We only need the data members information that were in the serializable class. Is there an easy way to get rid of those auto-generated information? I have found a solution for xmlserializer but not netd...

.NET XML Serialization and inheritance

I have structure like this: public interface A { public void method(); } public class B : A { } public class C : A { } List<A> list; List contains objects of type B and C they also have some fields that I would like to keep, can I now serialize it, deserialize back and get the proper object instances? Preferably to XML EDIT: ...

WCF DataContract with an abstract DataMember array

I can't make this scenario work. Here's the pattern- [DataContract] /*abstract*/ class BaseT { ... } [DataContract] class ChildT : BaseT { ... } [DataContract] class MessageContents { [DataMember] public BaseT[] XX; // Array of BaseT objects. I need WCF to somehow figure out that they're actually ChildT. } // ...receive a web...

is there any library to deserialize with python which is serialized with java.

is there any library to deserialize with python which is serialized with java. ...

WCF - choosing best suited binding/encoders

I have a client server application in which the communication between the client and the server is by WCF. My WCF services are supposed to be consumed only by my clients. ie, I am not bother about the service interoperability. The service might not be in same network as with my client application. And It would be hosted the service in I...

Designer serializes my user control collection property incorrectly (duplicate items w/o clearing it)

I have MyTreeView : TreeView component. And Nodes collection is filled in this component. When I place this component on the form, the Designer duplicates all Nodes items. So I need to force the designer not to serialize this public (non virtual) Nodes property, or force designer to clear Nodes collection before enter items there. Is i...

How do I serialize a child class?

how do I include the serialized data from a child class where both impliment iserializeable? Class A Implements ISerializable dim _B as new B Class B Implements ISerializable dim _C as integer end class end class I need to be able to serialize object B's data along with the data that is being se...

How to express int arry[6] in YAML

Hi , I have a type int arr[6], and the value is {1,2,3,4,5,6}. How should I express this data using YAML? ...

deserialize the XML Document --- Need Help

I am using the below code snippet now to deserialize the XML document ... [WebMethod] public XmlDocument OrderDocument(XmlDocument xmlDoc) { XmlSerializer serializer = new XmlSerializer(typeof(sendOrder.Order)); string xmlString = xmlDoc.OuterXml.ToString(); byte[] buffer = ASCIIEncoding.UTF8.GetBytes(xmlString); MemoryS...

Android and Protocol Buffers

I am writing an Android application that would both store data and communicate with a server using protocol buffers. However, the stock implementation of protocol buffers compiled with the LITE flag (in both the JAR library and the generated .java files) has an overhead of ~30 KB, where the program itself is only ~30 KB. In other words, ...

"System.Web.HttpContext cannot be serialized because it does not have a parameterless constructor."

I've created a web service that other sites can use to store errors in my database. They can then come to my site to view their errors, search through errors, filter errors, etc. However, I'm getting the following error for my web service: System.Web.HttpContext cannot be serialized because it does not have a parameterless construct...

WCF Serialization Return - Noob

I have an object which I serialize nicely into this: <?xml version="1.0" encoding="utf-8" ?> <people xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" userID="AX12345"> <group groupID="1234_ABCD"> <person name="Name 0" id="0" /> <person name="Name 1" id="1" /> <person nam...

What is the fastest serialization method for .net?

I'm trying to serialize data that's about 30KB and I need to find a faster way to serialize/deserialze the data. For me speed is as important as size so either I find a way to compact the data more tightly or I need to have a faster mechanism to build the objects. I've tried building some custom methods for it as well as using the buil...

What are the possible ways to exchange data in binary format between windows and solaris?

Hi Everyone, Could someone please help and tell me if there is any possible way to pass a data structure (i.e. binary format) through internet sockets between a program running on Windows and other program running on Unix? Any idea or link to materials that deal with it would be very appreciated. Thanking you in advance for your help, ...