Questions tagged [serialization]
Serialization is the process by which an object is converted into a format that can be stored and later retrieved.
291 questions
0votes
0answers
80views
Custom JSON Model Binder for deserialization with Newtonsoft JSON in ASP.NET MVC 5
I wrote this to have ASP.NET MVC be able to respond as a web API as well as the normal MVC Razor pages. I wanted Newtonsoft deserialization for models based on already parsed values: ...
0votes
0answers
42views
Flat serialization of single-value Java records used as strong types with Gson v2.11.0
Introduction I am currently developing a REST client in Java v21 and got the foundation basically working. In my project the Immutables and Gson library are currently used. Both libraries integrate ...
5votes
2answers
565views
Function templates for serializing/deserializing POD types
Are the two function templates below well-formed for serializing/deserializing POD types? Will they work for all the different types that satisfy the constraint pod?...
4votes
1answer
529views
Lazily decode a buffer with a thread-safe Iterator
I have implemented an Iterator for my Pojo class. The purpose here is to lazily decode multiple ...
3votes
1answer
124views
Type-safe number serialization-deserialization
I have written this code for serializing and deserializing integer and floating point numbers to/from vector/array of bytes. The aim of the code is to provide a simple interface to use, but make it as ...
2votes
1answer
146views
Binary (de)serialization library for c++
A while ago I posted the code for this library I'm working on, and have refactored the code quite a bit ever since. I would appreciate any feedback in regards to what I have so far to see what can I ...
7votes
2answers
2kviews
Serialization and deserialization a doubly-linked list with a pointer to a random node in C++
I tried to serialize a doubly linked list. Can you rate it, and what could be improved? I open the file with fopen(path, "wb") and write all data in ...
5votes
2answers
163views
Integer endianness types for protocol structures, take 2
Motivation When working with storage or wire protocols, we often read or write structures containing integers with specific byte-ordering (e.g. big-endian for Internet Protocol, or little-endian for ...
2votes
1answer
95views
Integer endianness types for protocol structures
Motivation When working with storage or wire protocols, we often read or write structures containing integers with specific byte-ordering (e.g. big-endian for Internet Protocol, or little-endian for ...
3votes
2answers
1kviews
Binary (de)serialization in c++
I'm trying to make a simple library for de/serialization in c++, but I know it can be tricky to implement, so I'd really like to have my code reviewed to see if there's anything that stands out and/or ...
4votes
1answer
411views
Abstract base class for binary serialization
Ensuring that some logic is always being run before the user's overriding methods. I'm writing a library and I have some abstract classes that can be binary serialized (and users can subclass them and ...
-2votes
1answer
570views
How can I optimize C++ serialization? [closed]
I want to serialize a C++ class Ramdomclass . Below is the serialization function. ...
0votes
1answer
532views
What can I do better in my C++ serialization implementation?
I want to serialize a class Mango recursively. ...
3votes
1answer
490views
Portable integer to/from little endian conversion in C
Integers need to be converted to a byte array of defined endianness to be reliably and consistently saved and transmitted, and converted back to be accurately received and read. The goal is to be as ...
4votes
1answer
196views
Python unit tests for storing and loading objects
I wrote some code and thought I may get better with some feedback. I program for almost 5 years, mainly in python. I care most about the unit testing. I am not really sure, how industry standard unit ...