I'd like to store some data in a cookie and my initial though was to pack it myself, but then I remembered that There Is A Module for Everything.
I have looked at both Storable and FreezeThaw. Both seem appropriate, though the latter mentions string specifically and seems to serialize into a string without newlines, whereas Storable cr...
HI,
I would like to have the configuration data for my application stored in a XML config file that I modify manually, however, I'm not sure how I would go about storing more complex types.
For example, If I wanted to store X,Y coordinates and I had a class to represent this, its easy enough to specify the data type, but I have no ide...
I'm using JavaScriptSerializer to serialize some entity objects.
The problem is, many of the public properties contain null or default values. Is there any way to make JavaScriptSerializer exclude properties with null or default values?
I would like the resulting JSON to be less verbose.
...
I would like to deep clone a List. for that we are having a method
SerializationUtils.clone ( object ) // apache commons method. Object shld be serializable
so now to clone my List i should convert that to serializable first. Is it possible to convert a List into Serializable list?
...
Following on from a previous question, I am having trouble combining the Lazy<T> generic that was suggested with my XML Serialization.
Here is the functionality I am using for Lazy<T>:
public struct Lazy<T> where T : class, new()
{
private T _Value;
public bool HasValue
{
get
{
return (_Value !=...
Is there a way to force XML elements generated from XML serialisation to be ordered in the same way as defined in the object class?
i.e.
class SerializableClass
{
[XmlElement("Element.1")]
public List<string> Element1
{
get { return _Element1; }
set { _Element1 = value; }
}
private List<string> _...
Hi everybody, I've a question about WCF.
I created a WCF service with a MSMQ endpoint. This service is exposed by a Windows Service and the service is consumed by an Asp.net application.
My Asp.net application uses an external DLL containing classes and enums (defined by eBay) that I'd like to use in my DataContract. I cannot modify th...
Going "old school" with a .Net 1.1 Compact Framework app and I'd like to be able to serialize a list of objects to memory -- are there any serialization libraries included in the 1.0 framework?
I should add that the System.Runtime.Serialization namespace doesn't exist in the 1.1 Framework (or so my compiler says).
...
Is there a way in Java/J2ME to convert a string, such as:
{name:"MyNode", width:200, height:100}
to an internal Object representation of the same, in one line of code?
Because the current method is too tedious:
Object n = create("new");
setString(p, "name", "MyNode");
setInteger(p, "width", 200);
setInteger(p, "height", 100);
May...
I've asked this before for Java, but this applies specifically to J2ME.
Is there a way in J2ME to convert a string, such as:
{"name":"MyNode", "width":200, "height":100}
to an internal Object representation of the same, in one line of code?
The problem with such JSON libraries, is that they generate JSONObjects from strings, not...
I a class containing multiple properties of type string. One of the values contains a character of hex value 96. If I serialize the class to xml, the xml serializer does not encode that character, and if I view the xml in various tools such as IE or SQLServer with OpenXML, it complains that the character is invalid in an xml document. ...
I am having a hard time figuring out how to expose (& loop through) the properties
of my Categories class which was serialized (using JSON) in a WCF service and
deserialized on the server as illustrated below.
JavaScriptSerializer serializer = new JavaScriptSerializer();
Category cat = serializer.Deserialize<Category>(param1);
// M...
My goal is to serialize JavaScript native datatypes for storage into an SQLite database. I'm doing this within a Firefox extension, and so I have access to the Mozilla platform XPCOM api. Initially I was thinking that the easiest thing to do would be to just store JSON strings.
However, if there is a way to serialize native datatypes w...
Is there any way to add fields to a DataSet which will be serialized along with the table information when the DataSet is serialized in XML? I have some information that describes the DataSet that I want to try to include inside it when I throw it around in XML. I've tried adding fields and classes in the partial class Visual Studio gene...
I have a DOM Document created from scratch and I need to serialize it to an output stream. I am using DOM level 3 serialization API, like in the following example:
OutputStream out;
Document doc;
DOMImplementationLS domImplementation =
(DOMImplementationLS) DocumentBuilderFactory.newInstance().newDocumentBuilder().getDOMImplement...
We save and read files by (de) serializing a class named "DocumentClass".
All was working well, untill we added 2 more fields to the documentclass. (We think that's the problem)
When we now try to open files that were serialized by the previous edition, we get an error.
System.ArgumentException: Object of type 'System.Int32' cannot be ...
I have a POCO class that is being sent to the browser as a JSON string in .NET 3.5 sp1. I am just using the default JSON serialization and I have some fields that I want to ignore. I want to put an attribute similar to [System.Xml.Serialization.XmlIgnore] on them so that they are not serialized.
...
Hello,
I have these three classes:
Command:
package pack;
public abstract class Command impements java.io.Serializable
{
public abstract void execute();
}
Client:
package pack;
// imports....
public class Client
{
Socket socket;
// Constructor...
public void sendCommand(Command c)
{
try
{
...
I'm trying to implement my own GenericIdentity implementation but keep receiving the following error when it attempts to load the views (I'm using asp.net MVC):
System.Runtime.Serialization.SerializationException was unhandled
by user code Message="Type is not resolved for member
'OpenIDExtendedIdentity,Training.Web, Version=1.0.0....
Consider the following Java exception classes:
public class FooException extends RuntimeException {
// [...]
}
public class FooException extends BarException {
private static final long serialVersionUID = -5322002268075295537L;
// [...]
}
If I wish to update the inheritance hierarchy to remove BarException, such that Foo...