Questions tagged [serialization]

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

24 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
75 views

Reading sparse matrix from binary file

I have binary files containing sparse matrices. Their format is: number of rows int length of a row int column index int value float Reading ...
4
votes
0answers
121 views

C++ string Formatter Again Part-4

Previously asked here. The code is now available on GitHub. Since the previous review I have added unit tests. Since it is big it will come in a couple of parts. Part 1 | Part 2 | Part 3 | Part 4 ...
4
votes
0answers
104 views

(de-)serializer for arbitrary python objects

My program is intended to allow (de-)serialization of arbitrary Python objects. It's basically a replacement for python's pickle module, which is similar but prone ...
3
votes
0answers
100 views

Java code to convert BigDecimal to/from .NET decimal

Background In many languages we have built-in data types for representing decimal floating point numbers. In .NET that's decimal, and in Java we have ...
3
votes
0answers
624 views

Implementing a JSON-serializable ORM model

I implemented a library which, amongst other things, implements a JSON-serializable ORM model based on the peewee framework. Here's the relevant excerpt: ...
3
votes
0answers
120 views

Trait class for a serialization framework

In a current project I have implemented a small non-intrusive serialization framework based on type traits. The generic trait template looks like this: ...
3
votes
0answers
319 views

Functionally Typed I/O Streams

I thought up a function that provides types with InputStream and OutputStream: ...
2
votes
0answers
33 views

F# XML Generation in .NET Core: XmlSerializer or XmlProvider

I am working on SEPA XML generator in F#. I developed two solutions that are roughly equivalent, one relies on the XmlSerializer while the other relies on ...
2
votes
0answers
126 views

WebAPI: Async Filtering CSV content + Json/XML Serialization

I am coding a csv file filtering api in ASP.NET Core, which takes a csv file located at a given uri (and retrieved via the query string) convert the content to a collection of records, then apply a ...
2
votes
0answers
55 views

Whole Packet Protocol Communication Library in Node

I have built this small class as a small library to be able to talk to a server that uses CapeSoft's NetTalk library as socket library, and which uses the Whole Packet Protocol, which is a simple ...
2
votes
0answers
234 views

Ruby Hash to XML

I've just made this "serialization" module in Ruby that takes a hash and outputs a XML string. ...
2
votes
0answers
215 views

Library for manipulation of binary protocol headers

I'm starting with implementing a TCP/IP stack for embedded systems which will be done in C++ and I've found I need a good way to work with protocol headers involved (e.g. ARP, IP, TCP). Major ...
2
votes
0answers
232 views

Binary protocol variability V3.0

Summary: Parsing an incoming stream of events from a binary communication protocol, if we have some variations in devices to support and would not like to have one huge switch to include everything. ...
2
votes
0answers
2k views

Reusable REST service class for Angular2 in TypeScript

I am creating an Angular 2 web application using TypeScript. This application performs REST requests to a REST "service". For each REST resource in my service I create a separate "Service" class in ...
2
votes
0answers
254 views

Better way to deep copy than this? How can I make it generic by `Collection` type?

Could I make this method for deep copy generic to the Collection type? That method is so simple and I can't imagine ever needing to change it, so maybe I should ...
2
votes
0answers
426 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 ...
2
votes
0answers
2k 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 ...
1
vote
0answers
541 views

A simple and efficient packet frame encoder/decoder

I have written a simple packet-framing class, for converting un-encoded 'packets' into encoded/delimited 'frames,' to be sent over a P2P serial connection. The functionality is based on the RFC 1662 "...
1
vote
0answers
43 views

Class that pickles, unpickles and extends pickled documents

I've been pickling ngram models and I wrote this class to be able to easily extend models when training. I wanted to know if it could possibly be done in a better way? ...
1
vote
0answers
396 views

Save protobuf-net serialized data with variable length to a file

My program gets continuously raw input from a stream (TCP), then process the data and output the data to a graph. It should also save the data to a file so it can be read afterwards. To archive this I ...
1
vote
0answers
186 views

A tiny library that implements bencoding (simple data encoding format)

Here are three files that make my library that implements a quite simple data encoding. What improvements would you suggest? README.md ...
1
vote
0answers
234 views

.NET List Serializer design

A few weeks back I wrote a class to help serialize/deserialize objects file. The file format requested was json, then compressed. After some coding/testing I settled on this design: ...
1
vote
0answers
163 views

Saving the state of a ViewModel

I've the following scenario, I've got some viewmodel that need to persist their state on disk. I've defined a custom attribute as: ...
0
votes
0answers
252 views

Basic Connect Four Game [Follow Up 1]

Here is an updated version of a basic connect four game I had posted previously. Changes include: an overhauled validator, simplifying the process by knowing where the last move was made Utilized an ...