We are using JMX for communication between different EARs on the same Websphere application server (6.1). All works well if we only use Java types as arguments, but if we use our own classes as arguments the problem is that we get ClassCastExceptions on the receiver side. This is obviously a classloader problem: if the jar with the argum...
We have a WCF service that uses Entity Framework to query a SQL database. The WCF service is our data access layer. If any of our applications what to read/write data to and from the database, we call a method on the WCF service. The WCF service serializes the EntityObjects to the client apps.
In the client app (e.g. WPF app or ASP.NET ...
In the olden times of .NET 1.1, I could use the SoapFormatter to find out exactly what was getting serialized when I copied an object into the clipboard.
Fast forward to 2010, and I tried to do the same trick. It turns out the SoapFormatter does not support generics. Is there an alternative way to find out exactly what binary objects ...
I have a class Team that holds a generic list:
[DataContract(Name = "TeamDTO", IsReference = true)]
public class Team
{
[DataMember]
private IList<Person> members = new List<Person>();
public Team()
{
Init();
}
private void Init()
{
members = new List<Person>();
}
[System.Runtime.Se...
Hi, everyone
I'm looking for an easy way of packing/unpacking data structures for sending over the network:
on client just before sending:
a = ((1,2),(11,22,),(111,222))
message = pack(a)
and then on server:
a = unpack(message)
Is there a library that could do pack/unpack magic?
Thanks in advance
...
I have this huge domain object(say parent) which contains other domain objects. It takes a lot of time to "create" this parent object by querying a DB (OK we are optimizing the DB). So we decided to cache it using memcached (with northscale to be specific)
So I have gone through my code and marked all the classes (I think) as [Serializa...
I'm trying to use javax.crypto.Cipher.doFinal(byte[]) method to encrypt an object. But, for security reasons, the object cannot be serializable.
So, how to convert the object to byte array without serialization?
--update
is using serialization the only way to use this Cipher method? Because as I know important data should not be serial...
First, please take a look at these code:
class Key;
class Door;
class Key
{
public:
int id;
Door *pDoor;
Key() : id(0), pDoor(NULL) {}
private:
friend class boost::serialization::access;
template <typename A>
void serialize(A &ar, const unsigned int ver)
{
ar & BOOST_SERIALIZATION_NVP(id) & BOOST...
What am I doing wrong here? I'm serializing a value, storing it in a database (table bb_meta), retrieving it... OK so far... but then I have to unserialize it twice. Shouldn't I be able to just unserialize once? This seems to work, but I'm wondering what point about serialization I'm missing here.
//check database to see if user has eve...
I renamed the class classBattle to Game and not I get "Unable to load type battle.classBattle+udtCartesian required for deserialization."
This is the line of code MapSize = (Game.udtCartesian)formatter.Deserialize(fs);
How do I fix this? Does this mean I cannot rename classes?
...
I am programming a GUI with Qt. In my GUI I have a huge std::map. And "MyType" is a class that has different kinds of filds. So, in a word, I want to serialize the std::map. How can I do that? Does Qt provides us with neccesary features?
...
I've got a settings object for my app that has two collections in it. The collections are simple List generics that contain a collection of property bags. When I serialize it, everything is saved with no problem:
XmlSerializer x = new XmlSerializer(settings.GetType());
TextWriter tw = new StreamWriter(@"c:\temp\settings.cpt");
x.Seriali...
I have a trie which I am using to do some string processing. I have a simple compiler which generates trie from some data. Once generated, my trie won't change at run time.
I am looking for an approach where I can persist the trie in a file and load it effectively. I have looked at sqllite to understand how they are persisting b-treebu...
I get the following text as a string from an XML-based REST API
'd':4 'ca':5 'sen':1 'diann':2,6,8 'feinstein':3,7,9
that I'm looking to deserialize into a pretty little Python dictionary:
{
'd': [4],
'ca': [5],
'sen': [1],
'diann': [2, 6, 8],
'feinstein': [3, 7, 9]
}
I'm hoping to avoid using regular expression...
Hi everyone,
I have a question concerning Json deserialization using Jackson.
I would like to deserialize a Json file using a class like this one:
(taken from http://wiki.fasterxml.com/JacksonInFiveMinutes)
public class User
{
public enum Gender { MALE, FEMALE };
public static class Name {
private String _first, _last;
...
In other cases it has been suggested that you simply add a SerializationBinder which removes the version from the assembly type. However, when using generic collections of a type found in a signed assembly, that type is strictly versioned based on its assembly.
Here is what I've found works.
internal class WeaklyNamedAppDomainAssembl...
I have a .NET web service (using asmx...have not upgraded to WCF yet) that exposes the following:
public class WidgetVersion1 : IWidget {}
public class WidgetVersion2 : IWidget {}
When I attempt to bind to the web service, I get the following serialization error:
Cannot serialize member WidgetVersion1 of type IWidget because it is an...
I'm writing some software that modifies a Windows Server's configuration (things like MS-DNS, IIS, parts of the filesystem). My design has a server process that builds an in-memory object graph of the server configuration state and a client which requests this object graph. The server would then serialize the graph, send it to the client...
I want to use a field (kind of QTextEdit), which is capabale of storing picture and text (like MS Word is doing) and it serializes and deserialaizes picture+text data. Is there any Qt Widget that allows us to manipulate with picture and text simultaniously and it has set/get functions which operate with serializable type? In othger word...
Is there a way to have any @property definitions passed through to a json serializer when serializing a Django model class?
example:
class FooBar(object.Model)
name = models.CharField(...)
@property
def foo(self):
return "My name is %s" %self.name
Want to serialize to:
[{
'name' : 'Test User',
'foo' : 'My name is Test User',...