serialization

Serializing a DevExpress Panel Control

Hi there, I have a program with a devexpress PanelControl which contains other data controls (Text box, lists etc'). I need to save this panel (All the data that the user entered) to my DB to display it later. I tried to serialize the PanelControl using BinaryFormatter but the class is not serializable.. Any idea how I can serialize the ...

Serialize form to and from JSON

I want to serialize a form into json, process the json object, then reserialize it to send to a php script via ajax. Here is a rough example of what I want to do: s = $('.dia_req_form').serialize(); j = //convert s to json ...HOW?? if(j.name) { alert("you must enter a name"); } if(selectedID) { j.id = selectedID; } s = //serial...

Can you optionally serialize a class property through JAXB?

Hello, Is it possible to optionally serialize the properties of a class via JAX-B using using some dynamic flag? e.g. Suppose I Have @XmlRootElement public class TodoItem { private int id; private String title; private String note; // getters, setters } and the following web service operatios: public TodoItem getTodoItemFull...

Java - serialversionuid

Hi all, Why isn't the serialversionuid automatically generated? I was running into an issue on an application server where apparently an old class was being cached. Walter ...

Preserving subelement namespace serialization with lxml

I have a few different XML documents that I'm trying to combine into one using lxml. The problem is that I need the result to preserve the namespaces on each of the sub-documents' root nodes. Lxml seems to want to push any namespace declarations used more than once to the root of the new document, which breaks in my application (it is ...

Binary parser or serialization ?

I want to store a graph of different objects for a game, their classes may or may not be related, they may or may not contain vectors of simple structures. I want parsing operation to be fast, data can be pretty big. Adding new things should not be hard, and it should not break backward compatibility. Smaller file size is kind of impor...

Should I store serialized (to xml) object in SharePoint list?

A requirement of my website is that I pull down data from external sources. To pull down the data, I have created a timer job (SPJobDefinition). In this job, I need to store the external data somewhere. First I was thinking I would just store it in cache, but then I was thinking I might want to have the data around longer (plus, I don't ...

Why do i get an InvalidClassException 'no valid constructor' when inherit from an abstract Serializable?

Hi, here's the code (simplified): public abstract class PageBase implements Serializable { private static final long serialVersionUID = -31905358958878336L; } public abstract class ListPage extends PageBase { public Controller getController() { // Controller is a class // that implements Serializable and do...

WCF Serialization Type mismatch

I have an object, lets call it UnSerializableObject, that I can't and change that I need to serialize. So I created my own object called SerializableObject that is serializable and contains all of the same data as the original object. which looks something like this: namespace test [Serializable] class SerializableObject { ...

de-serialization problems

Hi. We have a production system that uses a lot of Serialization. What be basically do is store an object called ProcessData in the jbpm database as byte array. Thus this is serialized. Consider the following Object. public class ProcessData implements Serializable { private static final long serialVersionUID = -4859440951531011062L...

nservicebus message serialization

I would like to use a base message class like: [Serializable] public abstract class MessageBase : IMessage { public Guid MessageID { get; private set; } public DateTime UtcDateTime { get; private set; } protected MessageBase() { UtcDateTime = DateTime.UtcNow; MessageID = Guid.NewGuid(); } public...

Trying to deserialize JSON

I've been banging my head against the wall on this for a while. Hopefully someone can point out something simple I can tweak so I can get moving again. I'm hooking up to the WHM API, and I absolutely cannot get the response to deserialize from JSON to an object. I've tried using the JavaScriptSerializer, the DataContractJsonSerializer...

What is the best way to save the contents of an ArrayList?

I want to save an ArrayList so that it is persistent. The contents can change. What is the best way of approaching this in android? ...

xsd.exe generates weird C# class for XML serialization

Hi, I have an XML schema in .xdr file. This is a shortened version of this file(just for example): <?xml version = "1.0" encoding = "WINDOWS-1252"?> <Schema name = "ANS.xdr" xmlns = "urn:schemas-microsoft-com:xml-data" xmlns:dt = "urn:schemas-microsoft-com:datatypes"> <ElementType name = "Shipment" content = "eltOnly" order ...

Problem serializing an object tree with SplObjectStorage

I have implemented a simple Composite pattern using SplObjectStorage, like the example above: class Node { private $parent = null; public function setParent(Composite $parent) { $this->parent = $parent; } } class Composite extends Node { private $children; public function __construct() { $t...

Android XML Object Serialization

I would like to serialize an object to XML inside Android. Any libs suggested? PS: Already tried XStream, but it doesn't serialize enums correctly with Android. The issue is here: http://stackoverflow.com/questions/3533894/serialization-problem-with-enums-at-android ...

Problem serializing and deserializing ArrayList

Anytime I try to serialize a file I get the error: FileNotFound. Not sure why. Here is my FileHelper code: package org.stocktwits.helper; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import jav...

Inserting into a serialized array in PHP

This is my first time here and I have been pulling my hair out over this one, so I thought it would be a good first question for me. I am saving some array data to a mysql database, and then later I am using unserialize to edit it. The problem is that it blanks out every other index in the array when I edit just one index. Here is som...

Boost serialization compiling issue

Hi, I am using boost serialization on windows, and I wanted to test my code on linux (ubuntu) and unfortunately it does not compile. #include <string> #include <fstream> #include <boost/archive/xml_iarchive.hpp> #include <boost/archive/xml_oarchive.hpp> #include <boost/serialization/string.hpp> #include <boost/serialization/nvp.hpp>...

Database "dynamic" types + Serialization

I have a set of classes, where each class represents a diferent type of a database field. For example, a very basic subset of it would be: public abstract class DbObject { internal DbObject() { } } public class DbInteger : DbObject { public int Data { get; set; } public DbInteger(int data) { this.Data = data; } } public class ...