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

4
votes
1answer
47 views

Converting string to dict using Python ast library

I have been trying to convert a string of dictionary objects as given below ...
5
votes
5answers
651 views

Menu to save and load football team information

I am a newb, and whilst I'm sure my formatting can be improved, I really want to know, how I can re-use my code for this simple program. The objective is simple, football game with a menu, that allows ...
8
votes
2answers
67 views

Racetrack game with reading the track from a file

For this community challenge I made the racetrack game. I'm reading the race data from a text file, which is available here. This is only playable by entering the velocity at the console. I've got ...
2
votes
3answers
275 views

XML serialization helper class

Yesterday was JSON serialization, today is XML serialization. I've taken some of the suggestions from there and made modifications, as well as making other modifications that were not suggested but ...
2
votes
1answer
96 views

JSON serialization helper class

I wrote this class to one-line all my JSON serialization, and I'm curious of any input on it. It's only responsible for serializing/deserializing any type to/from JSON. The comments and code are ...
6
votes
2answers
182 views

Binary serialization library

I am currently working on a binary serialization library written in C++11 for a personal project. I'd really like to have a review about my design, my implementation and everything else. The library ...
5
votes
1answer
297 views

Fastest De-/Serialise struct in .Net

I wrote this code to De- and serialise structures afap using IL generation (comments describes C# analogue). What can be improved here? ...
5
votes
2answers
66 views

Serialize/deserialize objects to and from database concurrently

I have a class which runs as spring bean in the container and its purpose is data persistence. In the overriden method ...
1
vote
1answer
43 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
43 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
55 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
54 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
111 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
99 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
52 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
276 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
57 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
66 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
2answers
122 views

De-serializing and serializing objects to be sent over the network

I am serializing and de-serializing a class object within the class which is then sent over the network like this: ...
4
votes
1answer
62 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
56 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
391 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
108 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
83 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
74 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
171 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, ...
4
votes
2answers
287 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
70 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
200 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
678 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
369 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
1k 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. ...
4
votes
1answer
153 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
219 views

Mapping enum keys to instance values

I am working on a pathfinding program / algorithm, and I have the following class: ...
12
votes
4answers
230 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
106 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
124 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
495 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
1k 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
503 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
294 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
287 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
174 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
159 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
351 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
2k 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
1k 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 ...
3
votes
1answer
135 views

Recursive reading of a UI configuration file

In our project (Windows app, Winforms), the UI is designed based on XML configuration file. I have a program to read the UI configuration file and Parse the configuration and design the UI. The ...
4
votes
2answers
132 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 ...