I'm trying to record temporal state data. This state data is sent from robot every 8ms. So I want to record complete state data into a file(state.bin). I want to serialize writing/reading state data to/from a file. And I found that everything is fine
I'm having a bit of a head scratching moment here, as I think I'm doing this correctly! I need to create an xml file as below, (I've left out the namespace declarations) <races> <race racename="race one"> <horse> <name>Si
When using DataContractSerializer to write a DataContract with a member like: [DataMember] public PropertyId PropId { get; set; } It reports a serialization error: SerializationException: Enum value '8493' is invalid for type 'EnumType' and cannot be
I'm using a 3rd party library that asks to use only serializable object with its methods. How do I ensure that a java object is serializable ? Sometimes my objects are just a list, a string or a simple POJO.If it implements Serializable.
I have absolutely no idea how to do this. Sample class that I use: class MyClass { private Size _size = new Size(0, 0); [DataMember] public Size Size { get { return _size; } set { _size = value; } } } This getting serialized to {size: "0, 0"}. W
When I first started using the Java Preferences API, the one glaring omission from the API was a putObject() method. I've always wondered why they did not include it. So, I did some googling and I found this article from IBM which shows you how to do
If I have a class defined [DataContract()] class MyObject { [DataMember()] ImmutableList<string> Strings { get; private set} } The ImmutableList<T> type comes from the immutables library https://www.nuget.org/packages/Microsoft.Bcl.Immutable.
I want to load my xml file in my app and read just specific tags from my xml. Can someone help me? I have tried couple of things but all I get is the full xml text, not the specific tags. This is the code: try { StorageFolder storageFolder = Package.
I have database rows containing serialized objects. I want to deserialize these, but the class has changed, some properties went private so the deserialization no longer works. Is there a way to force deserialization to an array or a stdClass? (or an
Background I have an object which I need to serialize in order to transfer to a high performance computing cluster for later use Previously, I've used the out-of-the-box binary formatter for my object which represents a statistical shape model and al
In my application I have a number of classes that I want to be able to serialize. So each class whose instances need to be serializeable has the following: friend class boost::serialization::access; template<class Archive> void serialize(Archive&
I am in a situation I need to serialize only the values of the members of an object to a file. for example, if the object contains 3 string members I would want the output of the serialization to be only this 3 strings without the serialization metad
I have an ASP.NET MVC4 website implementing a REST API, which I'm consuming from a client application. My ApiController methods take and return complex objects, as XML. I recently discovered RestSharp, and have begun moving my client project over to
I am currently trying to use Jackson to turn an object into a JSON string this was easily done by public byte[] toJSON(Object obj) throws IOException { ObjectMapper map = new ObjectMapper(); return map.writeValueAsString(obj).getBytes(); } Where i ru
Suppose I have a Serializable class ShapeHolder that owns an object that implements a Serializable Shape interface. I want to make sure the correct concrete shape object is saved (and the correct type is later restored). How can I accomplish this? in
Normally I try to stay well clear of DataSets and DataTables, but we currently have a requirement where it seems to make sense to use them. I'm having some problems serializing a DataTable when the DataColumn name contains a space and the type of the
In my app I am periodically writing a set of dynamic data to file. The data object gets updated about every second. Occasionally I get a "Collection was mutated while being mutated" exception on one of the lines in my encodeWithCoder: method. Ea
I'm wondering if there's a way in which I can create a tree/view of a serialised object graph, and whether anyone has any pointers? EDIT The aim being that should we encounter a de-serialization problem for some reason, that we can actually view/prod
I am hitting a brickwall with serialization of a subclass of Location in android/java Location is not serializable. I have a first subclass called FALocation that does not have any instance variables. I have declared it serializable. Then I have a se
I'm writing WCF service and his client. I want to send/receive objects of my custom classes, between service and client. I have 3 modules WCF service WCF client common class library Both WCF service and client have references to common class library.
I've got an quite simple class that contains some primitive types and some collections with mostly enums. Now I need to serialize this object to the smallest possible size that is UTF8 compatible. This is the class I need to serialize public class Co
I've got a form. In this form, a user can fill out a few fields, then click "Add". The data gets turned into an HTML element, and then the form gets (partially) cleared so that he can type some more data. I'm trying to figure out how to store th
Is it possible to serialize a .Net Dictionary<Key,Value> into JSON with DataContractJsonSerializer that is of the format: { key0:value0, key1:value1, ... } I use Dictionary <K,V>, because there is not predefined structure of the inputs. I'm in
In order to pass array variables via my curl script, I am using serialize because curl POST elements must not be arrays. The string that I get after serialization is: a:10:{s:8:"question";s:18:"How are you doing?";s:11:"view_optio
I'm serializing a xml string with the following code StringReader newStringReader = new StringReader(value.Value); try { using (var reader = XmlReader.Create(newStringReader)) { newStringReader = null; writer.WriteNode(reader, false); } } finally { i
I'm using an XmlSerializer to serialize an object and write it to a file. I've had quite a bit of success with the serializer doing what I want it to do in terms of nesting elements and what is serialized as elements vs attributes. Unfortunately, I'v
I'm communicating with several services from a SL component using both TCP sockets & HTTP web requests and we are discussing what (data) format to use - JSON or XML. I'm wondering what others have choosen and why? Cheers AWCI choose XML, purely becau
I have an Xml document that looks similar too <Reports xmlns=""> <Report> <ReportID>1</ReportID> <ParameterTemplate /> </Report> </Reports> It fails serializing to this object [XmlType(TypeName = "R
why not a lua implementation of google's protocol buffers? is there already any better solution exist for lua?I'm working on it as we speak: https://github.com/haberman/upb/wiki Also, I'm the guy who wrote the 100-line parser above. But my upb librar
I have an object that I'd like to serialize and distribute between processes as efficiently as possible. The object itself has a reference to another object like so: public class Foo { // Unique Identifier: public int Id; public Bar Bar; } public cla