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

1
vote
1answer
38 views

Properly managing a collection from deserialized XML file throughout app's lifetime

I'm developing a WinForms app to manage some settings and profiles for multiple video games. The list of video games is specified by the user, and I'm trying to figure out how to properly maintain ...
3
votes
1answer
38 views

A tiny library for textual serialization of lists in Java - follow-up 3

See the previous iteration. I have incorporated the answer of h.j.k.. Now I have: LineStringSerializationFactory.java: ...
5
votes
1answer
51 views

A tiny library for textual serialization of lists in Java - follow-up 2

See the previous iteration. See the next iteration. I emphasized the fact that serialization routine may not return a string with new line character by using more or less explicit identifier. Moved ...
5
votes
2answers
49 views

A tiny library for textual serialization of lists in Java - follow-up

See the previous and initial iteration. See the next iteration. I have mainly refactored the code and made it a little bit robust (if serialization of a single object produces a string with new line ...
8
votes
2answers
80 views

A tiny library for textual serialization of lists in Java

Note: see the next iteration. I have this tiny library for (de)serializing lists of objects. The requirement is that each object's state may be represented textually as a single line of text. Later ...
7
votes
1answer
80 views

Persist values for a known set of keys in Python

Use case: I sometimes write programs that want to store a little state between runs, e.g., "What was the last file selected last time this program ran?" I wanted a convenient way to track this state. ...
4
votes
1answer
40 views

Serializable Queue header only library

I was hoping someone could check the library I 'm working on to see if they could give any suggestions. My biggest issue right now is getting tuple to work with more than just the basic types and I ...
10
votes
1answer
217 views

Rendering an HTML form based on a specification in a string

Here's a brief explanation of my method: Provide a string and parse it to HTML code respecting a specific format. The accepted format is: For dropdown menu : Test DropDown~Select:Options1; ...
2
votes
0answers
43 views

Serialize/deserialize a vector using insertion/extraction operators

I've never serialized a structure to a file before in C++, so I'm looking for critique on my first try at it. My main concerns are: It uses the streams space-delimited behavior. If a ...
1
vote
0answers
50 views

Serializing and deserializing objects in Java

I have a class that receives an Object object as a parameter. Then, I want to write two functions to serialize, and ...
4
votes
1answer
70 views

De-serializing and Serializing objects the proper way

I am serializing and de-serializing a class object within the class which is then sent over the network like this: ...
4
votes
1answer
54 views

Pickling cars with simple management system in Python

This is my first Python program (before that I've been just poking around with the interpreter itself). I took this opportunity to do some user input and play around with ...
7
votes
3answers
50 views

Saving and restoring RadixTree object

I have a large word-file which is fixed with over 240 000 words. I need to check if a specific word exists in this list. I thought that it would be a good idea to create a ...
10
votes
2answers
252 views

Optimize a generic foreach method that converts Datatable to my object using Reflection

I need to optimize this code block below, this method converts a Datatable object to the Object that I am passing by parameter, in another words, this serializes the object, however I have to run this ...
1
vote
1answer
82 views

Creating an adjacency list in C++

I want to create an adjacency list based on data I get from a text file. Could I make this simpler? ...
3
votes
2answers
50 views

Simple medical collection/database about patients visits

I am writing a system for doctors who are regularly visited by patients. The doctor adds each patient's visit to collection/database. The class can save data to an .xml file and restore it. Can you ...
4
votes
1answer
52 views

Generic Pickle-Aware Super-Class for Mixing Classes with and without __slots__ in Python

I want a generic super-class that I can easily subclass - and if desired add slots to my class - without having to worry about any pickle issues (with the lowest protocol). Is this in general a good ...
7
votes
1answer
131 views

Custom Serialization of Game World

I'm working with libGDX for a game, and over the last few days I have tried a few different types of serialization before settling on a custom serialization implementation. XML had huge file sizes, ...
3
votes
2answers
279 views

Data Persistence

I was wondering if I could get some feedback on the library I created to persist data online. JitterPushDemo.java ...
8
votes
1answer
61 views

Writing data into an image

I've done a script that will write things as images, which can then be read elsewhere (eg. you could share an mp3 through imgur). This is the first one I've done where I've been trying to improve my ...
3
votes
1answer
153 views

Servlet responses to upload/download requests

My task is to write a program to store files in object store. One of the subtasks requires to send json or xml format response to the file uploader/downloader as requested by client. The following ...
3
votes
2answers
305 views

Excel to serializable object

I've got an Excel file from which I have to read out data to an object to serialize. So far I came up with this solution, and I'm curious if there are any clearer solutions. ...
10
votes
3answers
317 views

Simple Generic output for Deserializer

Lately I have been learning about serialization so I decided to write a little helper class for my application to make it easy to use this feature in multiple places. I actually mixed some generics in ...
2
votes
1answer
852 views

Reading and writing Serializable objects using NIO

I have created the following class to read Serializable object from file and write to a file. ...
3
votes
1answer
98 views

A simple “Tamagotchi” like game that uses math questions as food

I wrote a Tamagotchi-like game where to feed the pet, you do math questions instead of just pressing a button. It's persistent, in that on loading, it figures out long it's been since the last save, ...
3
votes
2answers
140 views

Mapping enum keys to instance values

I am working on a pathfinding program / algorithm, and I have the following class: ...
12
votes
4answers
216 views

Rolling my own Configuration with UI

The Rubberduck Saga continues as I find a need to roll my own configuration. Since the program is really a *.dll and available to several host applications, using app.config is not an option. I ...
6
votes
1answer
96 views

Finding Magic Comments to Create a Custom Task List

I've been working on a COM Add-in for the VBA IDE with a friend. The idea is to search the active VBA Project for "magic" comments and create a task list much like any sane IDE would have. This is ...
1
vote
1answer
103 views

Save parameters in a “key: value” format

I have been playing with Java for around a year and I started writing this API for storing data in files. I wrote this method which will save the parameters in a "key: value" format in a file. The ...
5
votes
1answer
349 views

Import and export of animation keys in Maya

I have programming this importing and exporting of animation keys. It is working, but I would like to gather any feedback/advice as I am still pretty much a noob in coding. ...
0
votes
1answer
562 views

Efficiently serialize big JSON using GSON without loading everything in memory?

Below is my JSON in which I have only three reportRecords just for demonstration purpose but in general sometimes we are getting pretty huge json, then it doesn't ...
5
votes
3answers
395 views

Is this a good way to implement a tile map from a text file?

I'm working on a small final fantasy type game. I have this for a tile map. I was just wondering if this is a good way to do this or if anyone has any suggestions, I would love to read them. ...
3
votes
4answers
247 views

Function to extract bytes as a decimal

You give this function a pointer and how many bytes you want to extract as a decimal and it returns it. ...
2
votes
1answer
209 views

Efficiently packing the header and data in one Byte Array in a single class

I have a header and data which I need to represent in one Byte Array. And I have a particular format for packing the header in a Byte Array and also a different format to pack the data in a Byte ...
1
vote
0answers
123 views

Transfer Python data structures through ssh

I need to communicate between 2 machines through ssh to do some processing on one of the machines, and at the end, transfer the output to the first machine. Given ...
8
votes
1answer
154 views

Saving bytes instead of objects to write smaller files

This question is about reducing the size of files saved to disk in an infinite world 2D mining game. I finally added code to my game to save and load distant chunks instead of keeping all of them ...
4
votes
3answers
252 views

Basic Encoding Rules (BER) class for embedded system

I'm implementing a communications protocol in an embedded system and the protocol uses a subset of the ASN.1 BER (Basic Encoding Rules). In a nutshell, this class simply represents a TLV triplet ...
3
votes
2answers
1k views

Encrypt and decrypt a serializable object

I want to make sure that the code I have for encrypting and decrypting a serializable object makes sense and is proper. Does it look right too? Here's what I have so far: ...
10
votes
1answer
853 views

Inspector interface serializer

I've written some code that allows Unity3D's inspector to display fields that conform to an interface. Unity has some quirks about their inspector, so as a preface they are listed here: If you add a ...
4
votes
2answers
126 views

Serializing data from two URLs in the same object efficiently

This is a follow-up to: Serializing JSON data coming from two URLs in the same object I have two URLs (urlA and urlB) and they ...
10
votes
4answers
2k views

Persistent cookie support using Volley and HttpUrlConnection

I need to add support for persistent cookies on an Android app that I'm building for Authentication/Authorization. This app uses Volley for making HTTP requests and its ...
5
votes
1answer
236 views

Parsing Valve Key-Value files

Introduction Valve recently launched the Dota 2 Workshop Tools, which allows players to create their own maps with custom gamemodes, similar to Warcraft 3 in capabilities. Ability and unit ...
5
votes
2answers
488 views

Converting a boolean list to string, and vice versa

I am currently using this to convert a List of booleans to a string ...
1
vote
1answer
124 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 ...
3
votes
0answers
76 views

Functionally Typed I/O Streams

I thought up a function that provides types with InputStream and OutputStream: ...
3
votes
1answer
38 views
5
votes
1answer
46 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
225 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
2k 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
462 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 ...