serialization

How to efficiently store bitsets on Android.

My application requires me to store sets of bits along with some accompanying metadata on the Android platform (read only for now). Now obviously I could just implement the Serializable interface, but I hear it's very slow on Android (I can imagine has to do something with the custom VM and compiler that makes such reflective features in...

SubSonic SimpleRepository storing member class

Hi! I'm new to C# and Subsonic. I'm trying to solve the following case: public class UnknownInt { public int val; public bool known; } public class Record { public int ID; public UnknownInt data; } I'm using SimpleRepository. Is there a way I can get UnknownInt serialized before storing it in the SQL database (perhaps as ...

Converting binary serialization to Soap serialization

I want to send binary serialized messages, but I am worried that if there is an error when de-serializing, I won't be able to figure out the problem. For SOAP, I would just be able to see the messages, but I don't want all of the CPU overhead for XML processing of SOAP messages. The other problem with SOAP messages is that they fail if...

Write Serialized XML to String and Display in Browser

I have a serialized object which needs to be sent as an encrypted XML string. I am able to save the serialized object to a well-formed XML file, but this is not what I want. I have already got Rijndael encrypt/decrypt working for a sample string. Person person = new Person("Irish", "Chieftain"); XmlSerializer xmlSerializer = new XmlSeri...

Serialization of Javascript from Server(NodeJS) to Browser

I would like to serialize an instance of JS object from the Server-side to the Client side (the object contains data members and functions) I have a Javascript stack on both end, all my users use Chrome and My server side is a NodeJS impl.. how would I do it? It should be trivial as my server is a Javascript one.. ...

Storing and replaying binary network data with python

I have a Python application which sends 556 bytes of data across the network at a rate of 50 Hz. The binary data is generated using struct.pack() which returns a string, which is subsequently written to a UDP socket. As well as transmitting this data, I would like to save this data to file as space-efficiently as possible, including a ...

can you pass a serialized c# class to json via jquery?

let's say i have a class: [Serializable] public sealed class MyFoo { public int ID { get; set; } public string Name { get; set; } } I want to pass data from my Webservice to the JQuery ajax this class to the JS and parse it like an object. [WebMethod] public MyFoo GetData() { return (new MyFoo); } $.ajax({ success: function...

C++ Boost serialization Serializing templated derived classes

Hi, i would like to serialize a class with an attribute as a list of pointers on a generic class This is the parent class from which the generic class derives : class Base{ public : friend class boost::serialization::access; virtual ~Base(){} template<class Archive> void serialize(Archive & ar, ...

How does delphi convert ModalResult properties?

Hopefully this is a quick one, and "Easy if you know how"... I'm writing some kind of Serialization/Scripting class to generate forms on the fly, I tried setting a TColor the other day and got an error clBtnFace is not a valid integer value or something like that and found that the constants used in properties are registered so that th...

Serializing POCO Entities

Can I serialize POCO classes? I'm using the C# POCO entity generator. I tried to edit the .tt file which generates the entity classes to add the Serializable attribute. Is it right? ...

Way to Deserialize JSON from HttpWebResponse without 3rd party frameworks

I'm trying to keep from depending on open source or third party libraries such as Json.NET to parse incoming JSON from an HttpWebResponse. Why? Because the more reliance on open source frameworks to aid in your implementations, the more your app has to rely on those dependencies...I don't like my apps to be depenent on a lot of librari...

How do I turn Moose objects into JSON for use in Catalyst?

I have a series of Moose objects that I'm looking to feed to JSON::XS by way of Catalyst::View::JSON. JSON::XS is unable to encode blessed data-structures. I know that there is MooseX::Storage::Format::JSON which can -- kinda -- do what I want; but, it seems pretty overly heavy. What I'm looking for is essentially the same information th...

VB.NET - Custom Serialization and Circular References, is there a clean solution?

I'm implementing some custom serialization (to byte array), and have run into a problem handling circular references. Example: Class A public MyBs as new List(of B) end class class B public MyParent as A public MiscInt1 as integer public MiscInt2 as integer end class When serializing A, I must serialize each instance of B....

serialize java objects to objective c plist

Hi, I have a java web server (google app engine to be precise) and which works with an iPhone app written in objective C. I'd like to transfer data from the server to the client - specifically I'd like to serialize my plain old java objects to an objective c plist string so that it can be easily parsed by the client iphone. Are there an...

xml beans: error "date before year -4713"

Hi All, I have next xml <b:Recording> <b:startTime>2010-08-03T08:39:31.132625</b:startTime> <b:stopTime>2010-08-03T08:40:50.132625</b:stopTime> <b:timeDiff>PT3M10.867375S</b:timeDiff> </b:Recording> during process of serializetion t...

How can I deserialize properties which don't have an in built converter?

This is a spin off from my last question How does delphi convert ModalResult properties? Since Delphi doesn't convert ModalResult properties, what's the best way for me to convert ModalResult properties to integers? I don't really want: If SpecialCase then else if AnotherSpecialCase then else BehaveNormally So how do I convert value...

Understanding System.Xml.Serialization.XmlIgnoreAttribute with base classes

I have two classes, shown below: [Serializable] [XmlInclude(typeof(SomeDerived))] public class SomeBase { public string SomeProperty { get; set; } } public class SomeDerived : SomeBase { [XmlIgnore] public new string SomeProperty { get; set; } } When I serialize and instance of SomeDerived I don't expect to see a value fo...

Defining the fields to be exposed (serialized) not via DataMemberAttribute

Hi, I have an autogenerated class, which I want to partially reuse as DataContract. Since the class is periodically auto-regenerated, I wouldn't like to add DataMemberAttribute to its properties, because it will be lost. What are the alternatives? Can I define which properties are going to be serialized programmatically or, may be, via a...

Store And Replay WCF Messages

Hi all, I want to store WCF messages in some storage and read them later on in order to "replay" them again. Attached some code parts: private void WriteMessage(Message message, string path) { FileStream fileStream = new FileStream(path, FileMode.Create); using (XmlDictionaryWriter writer = XmlDictionaryWriter.CreateBinaryWriter...

De-serializing some XML (via a Stream) into Parent/Child objects

I have a fairly simple DAL assembly that consists of an SalesEnquiry Class which contains a List<T> of another Vehicle class. We'll be receiving XML files by email that I'm wanting to use to populate instances of my SalesEnquiry class, so I'm trying to use de-serialization. I've added XMLRoot/XMLElement/XMLIgnore attributes to both cla...