Hello,
Is there a way to serialize enums automatically as int? Every time I define a new enum and write
std::stringstream stream;
stream << myenum1;
stream >> myenum2;
the compiler complains that the operators << and >> are not defined. Do you know a way to tell the compiler to treat enums as plain int's?
What makes the problem har...
I am trying to serialize an ASMX web service result, but I get the following error.
There is an error in XML document. ---> System.InvalidOperationException: <ArrayOfT_SATQuestionInfo xmlns='http://tempuri.org/'> was not expected
Any idea on how to fix this so it will 'expect' the namespace?
...
We released a program that serializes a very complex object using the .NET soap formatter. Soap didn't handle new versions of the classes involved very well so we're switching to the binary formatter.
To handle old object versions, I wrote a converter that deserializes the object in soap, and re-serializes it in binary.
The converter ...
I have a handful of public read/write members that are not being serialized and I can't figure out why. Reviewing some code, and my root class is marked serializable:
[Serializable]
public class MyClass
I have a default constructor that initializes 10-15 string members. There are about 50 public read/write string members in MyClass wi...
Can Richfaces (de)serialize objects? Say for instance, I have a row of data being displayed in a richfaces table. Can I serialize the row of data to a string and later deserialize it back into a row?
...
I'm writing a client for a server program written in C++. As is not unusual, all the networking protocol is in a format where packets can be easily memcopied into/out of a C++ structure (1 byte packet code, then different arrangements per packet type).
I could do the same thing in C#, but is there an easier way, especially considering l...
I have an Aspect that implements INotifyPropertyChanged on a class. The aspect includes the following:
[OnLocationSetValueAdvice, MethodPointcut("SelectProperties")]
public void OnPropertySet(LocationInterceptionArgs args)
{
var currentValue = args.GetCurrentValue();
bool alreadyEqual = (currentValue == args...
when is serialization,marshaling etc required during communication between programs residing across 2 different machines /network/Internet?
Suppose I have a client program in java/flash and a server program in C. Can't I implement communication using a custom protocol of my own ? I guess so. When is serialization etc needed?I am aware J...
I am using json and jsonpickle sometimes to serialize objects to files, using the following function:
def json_serialize(obj, filename, use_jsonpickle=True):
f = open(filename, 'w')
if use_jsonpickle:
import jsonpickle
json_obj = jsonpickle.encode(obj)
f.write(json_obj)
else:
simplejson.dump(obj, f)
f.cl...
I have two lists (list1 and list2) containing references to some objects, where some of the list entries may point to the same object. Then, for various reasons, I am serializing these lists to two separate files. Finally, when I deserialize the lists, I would like to ensure that I am not re-creating more objects than needed. In other wo...
I need to take a portion of my xxx.config custom configuration and serialize it as JSON directly into my page.
Using DataContractJsonSerializer yields
{"LockItem":false}
Which is similar to the response from XmlSerializer. I can't seem to find an override that gives me control over the serialization process on System.Configuration ...
I am trying to serialize a ItemTransaction and protobuf-net (r282) is having a problem.
ItemTransaction : IEnumerable<KeyValuePair<Type, IItemCollection>></code>
and ItemCollection is like this:
FooCollection : ItemCollection<Foo>
ItemCollection<T> : BindingList<T>, IItemCollection
IItemCollection : IList<Item>
where T is a derive...
I have a set of data points, each described by a dictionary. The processing of each data point is independent and I submit each one as a separate job to a cluster. Each data point has a unique name, and my cluster submission wrapper simply calls a script that takes a data point's name and a file describing all the data points. That sc...
Hello,
I'm working on a server/client project
the client will be asking the server for info and the server will send them back to the client
the info may be string,number, array, list, arraylist or any other object
I found allot of examples but I faced issues!!!!
the solution I found so far is to serialize the object (data) and send ...
I have a Location class that contains a lat/lon as well as an elevation and timestamp:
@interface Location : NSObject <NSCoding> {
double lon;
double lat;
double ele;
NSDate *time;
NSDateFormatter *gpxDateFormatter;
}
I want to be able to serialize an NSMutableArray containing an arbitrary number of these Location objects into ...
I've got a class which implements it's own (de)serialization via XLINQ, and I'd
like to have clients of my class which attempt to XMLSerialze my class to have
my XLINQ method called instead.
Is that possible?
...
I am trying to migrate existing code that uses XmlSerializer to protobuf-net due to the increased performance it offers, however I am having problems with this specific case.
I have an object[] that includes parameters that are going to be sent to a remote host (sort of a custom mini rpc facility). I know the set of types from which the...
For example, if a request is made to a resource and another identical request is made before the first has returned a result, the server returns the result of the first request for the second request as well. This to avoid unnecessary processing on the resource. This is not the same thing as caching/memoization since it only concerns ide...
I have a struct called coordinate which is contained in a list in another class called segment.
public struct Coordinate
{
public double Latitude { get; set; }
public double Longtitude { get; set; }
public double Altitude { get; set; }
public DateTime Time { get; set; }
}
public class Segment
{
private List<Coordina...
I am dealing with an old app in asp classic vbscript. I'd like to store the input of a form in a database text field as the form fields are a subject to frequent change and I don't feel like normalizing the old database.
Any solutions for serialization in vbscript?
Thank you!
...