Serialization is the process by which an object is converted into a format that can be stored and later retrieved.

learn more… | top users | synonyms

3
votes
0answers
38 views

Reading and writing binary data in C++

I have written a small container class which groups a 3D position, a normal vector and a texture coordinate into one object. It uses the glm library for the actual data types (vec2 and vec3). This ...
10
votes
1answer
157 views

Organization data class

I believe I have made the following data class quite decently, and I'd like a thorough review on it. The code is built on Java 8 and uses the Builder and Serialization Proxy pattern, it is used to ...
4
votes
1answer
86 views

How could I reduce repetition with properties/methods?

I'm serializing instances of a lot of classes (in C# 3.0), and I've found myself writing this: ...
5
votes
1answer
156 views

Simplify C# Helper Class to change property of string when serializing for Json.Net

Is there any way to simplify the following C# helper class to numerate a string for Json.Net? ...
7
votes
1answer
96 views

Python compress and send

The following two functions are used to compress arbitrary Python objects and send them safely via socket or email, using only printable chars. In my specific message protocol, '=' signs are also not ...
3
votes
1answer
84 views

Serializing tabular data in ruby — is map, flatten, hash the correct approach?

I wanted a hash which lets me reference Japanese syllables by their romanized names. In hindsight I could have searched for an existing one column table, but I wanted to improve my ruby by writing a ...
3
votes
3answers
83 views

Forcing type-safe IDs for use with Collections and Maps

Introduction I have a hierarchically nested tree class (like SampleFolder, s.b.) that I want to serialize. The problem arises with the collection of sub items ...
5
votes
1answer
998 views

Parse strings and convert the value to .java types

Below is a generic code for parsing strings (read from file for example) and converting them to .java types, such as primitives (and their wrappers), java.io.File, Enum etc. There is also possible to ...
0
votes
1answer
880 views

Serializing/deserializing binary tree in most space-efficient way

I'm looking for corrections, optimizations, general code review, etc. ...
5
votes
1answer
106 views
3
votes
1answer
206 views

best way to write series of objects to a .ser file using ObjectOutputStream and read them back [closed]

I create series of objects out of Student Class and store them in a vector. I write each object in to a .ser file once it created. Then I read them back. My code is working perfectly. What I want to ...
0
votes
1answer
273 views

Generating redundant data for Google Maps markers

I'm a mediocre programmer at best, and pretty terrible at JavaScript. But I have been tasked with creating a Google Maps application. This application is driven by a dynamic report with a Java layer ...
3
votes
1answer
1k views

Writing integer to binary file

I wrote a python function that writes a integer to a file in binary form. But are there any ways that I can reduce the number of steps, is there a more efficient way to write a integer to a file? ...
2
votes
1answer
55 views

Is this the only or best method for classes serializing in Java?

I usually use the static methods from this designed class in order to perform objects serializing of custom classes. Even though I'm getting good results, I wonder if this is the most appropriate way ...
1
vote
1answer
436 views

Best way to deserialize a Byte Array from Java in C++?

I am writing Byte Array value into a file using Java with Big Endian Byte Order format.. Now I need to read that file from C++ program... That Byte Array which I am writing into a file is made up of ...
8
votes
1answer
217 views

Improve this reflection bashing code

I have implemented an IDataContractSurrogate to enable serialization of ImmutableList<T> (from the Microsoft Immutable ...
1
vote
1answer
196 views

Serialize the properties of an entity framework entity to data fields and back

I am trying to write code to convert properties of an Entity Framework entity to strings and back. Here is the code so far that converts back from strings to the object properties. I am stuck trying ...
5
votes
2answers
6k views

Simple address book in Java

I've answered the following question as best as I could, but I need some help with my design and am wondering if I've taken the correct approach. I would appreciate it if anyone could please point ...
1
vote
1answer
871 views

Write and read non-serializable object to file android example

I couldn't find a good example, so after some fighting with writing non-serializable object to file in Android, I decided to show you my solution. Could you tell me if it is OK or how could it be ...
5
votes
2answers
1k views

Spring autowiring in managed beans with support for serialization - is this safe?

Im trying to solve two problems I see with JSF2 and Spring. First @Autowired in @ManagedBean does not work Nor does ...
5
votes
0answers
302 views

Basis of custom C++ serialization lib

I know it's been done a million times already, but I couldn't find a serialization library to suit my needs. This is the very basis of what I came up with. I know the code is ugly and unstructured, so ...
7
votes
0answers
1k views

JSON Serializer

Carrying on from: Yet another C++ Json Parser Yet another C++ Json Parser (Recursive) All the code is available from git hub: ThorsSerializer but only reviewing a small section here. The idea is ...
5
votes
4answers
532 views

Persist data by serializing/deserializing objects that are sent to it

I've created the following class to persist data by serializing/deserializing objects that are sent to it. I would like to know if there is a better way of writing this class, or if my class is fine ...