Serialization is the process by which an object is converted into a format that can be stored and later retrieved.
1
vote
1answer
94 views
Should this container be a struct or a class?
I have a class that serves purely as a data container for passing values from a parsing class to a class responsible for saving the data. I have been wondering whether it would be more appropriate as ...
4
votes
0answers
47 views
Functionally Typed I/O Streams
I thought up a function that provides types with InputStream and OutputStream:
...
3
votes
1answer
28 views
3
votes
0answers
25 views
Robust organization data class (partial followup)
This question is a partial followup from my previous question, however the requirements have changed: I now need to be able to store multiple data entries for some fields.
I also have added two hooks ...
1
vote
2answers
42 views
Updating XML config files
I have been unable to find any other way to update a user config file than the following method.
...
7
votes
1answer
133 views
Type-length-value (TLV) encode/decode
I wrote these methods to encode data as array of TLV objects, and also to serialize and deserialize them. Any feedback on improvements, etc. would be appreciated.
Please note that I ignored ...
5
votes
3answers
142 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
185 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
95 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
183 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
120 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
93 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
91 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
2k 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
1k views
Serializing/deserializing binary tree in most space-efficient way
I'm looking for corrections, optimizations, general code review, etc.
...
5
votes
1answer
114 views
3
votes
1answer
252 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
287 views
Generating redundant data for Google Maps markers
I'm a mediocre programmer at best and am 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
2k 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
453 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
226 views
Improve this reflection bashing code
I have implemented an IDataContractSurrogate to enable serialization of ImmutableList<T> (from the Microsoft Immutable ...
1
vote
1answer
203 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
1k 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
2k 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 ...
4
votes
2answers
1k views
std::vector memory manipulation with serialization and deserialization
This is my code and I would like to get it code reviewed. It is functional and behaves as expected.
I pass some basic types to the Serialize() function and then ...
5
votes
0answers
311 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 ...
8
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 ...
4
votes
3answers
337 views
Converter for deserializing JSON
I'm writing a custom JavaScript converter to deserialize some JSON. Here's a few lines I'm writing:
...
5
votes
4answers
541 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 ...