Questions tagged [serialization]
Serialization is the process by which data-structures are converted into a format that can be easily stored or transmitted and subsequently reconstructed.
serialization
33,468
questions
1
vote
0
answers
9
views
XML serialisation for utf characters contains ncr for surrogate pair
I have a payload that may contain some text like 𠮷. When I serialize this payload to xml, I expect such characters to be not encoded to ncr or encoded as 𠮷 a single character but I ...
-1
votes
0
answers
18
views
pickle serialization not persisting after closing program
Ive made a program to track my barbell lifts. The code I've shown below is opening up a serialized pickle dictionary called users, and if users is empty it prompts the user to create a profile.
import ...
1
vote
2
answers
26
views
How to set a JsonSerializerOptions globally for my httpClient.GetFromJsonAsync<T> calls
In my ASP.NET web API I have httpClient which call GetFromJsonAsync:
var jsonSerializerOptions = new JsonSerializerOptions
{
PropertyNameCaseInsensitive = true,
};
...
0
votes
0
answers
21
views
Kafka Producer Key Shows Incorrect Value After Sending Message
I am working on a Spring Boot application where I am using Kafka to send messages to a topic. I am setting a specific key for each message, but after successfully sending the message, when I check the ...
0
votes
0
answers
14
views
Serialization Issues?
I create a .NET dataset in my web api that has the following schema when I perform a DataSet.GetXmlSchema:
<xs:element name="Table2">
<xs:complexType>
...
0
votes
1
answer
15
views
Django Profile Page Not Displaying Related Worker Information with Djoser
I'm working on a Django application where users can be either normal app users or workers with additional details. I'm using Djoser for user authentication and registration. I'm having trouble with my ...
0
votes
0
answers
17
views
System.Net.Http.Json is not taking Fields into account when serializing or deserializing to JSON [duplicate]
When trying to Serialize a model which has data stored in fields System.Net.Http.Json is outputting an empty JSON Object. It works only when I use property with getters and setters.
I tried looking ...
0
votes
0
answers
32
views
How to get correctly sign Solana transaction using PHP Laravel?
I'm using getblock.io as a node for Solana network and I'm trying to sign a transaction and send it through that node in Laravel, but I'm facing a problem with the serialization of the transaction ...
0
votes
0
answers
37
views
Problem using `shelve` in "__main__" vs imported module
Consider the following program (Python 3.10), which consists of two files:
mymodule.py
import dataclasses
import shelve
from typing import Optional
# public api
# ----------
@dataclasses.dataclass
...
1
vote
1
answer
54
views
Serialising a model with signals in Angular 18
I'm trying to serialise a model object to local storage (or IndexedDB), however it contains signals.
// An example of the model I'm dealing with
export class ExampleModel {
canSerialise = "&...
1
vote
0
answers
24
views
Trying to deserialize class with Font and get : Deserialization of types without a parameterless constructor
Using System.Text.Json, I have a class with some properties including System.Drawing.Font properties.
There's no problem serializing it, but i can't deserialize it.
I Get the error Deserialization of ...
0
votes
0
answers
10
views
YamlDotNet - how to handle versioning after object update?
I'm using YamlDotNet in my projects for quite a while, though I could use your help with the following issue I'm facing as one of the projects is evolving.
Imagine I'm serialising the following ...
0
votes
0
answers
17
views
Store/load Scikit Learn objects (Pipeline, ColumnTransformer) without different version considerations?
I need to be able to somehow store and reload a Scikit Learn pipeline in a way that breaking changes between different Scikit Learn versions aren't as much of a concern as they are when I use e.g. ...
0
votes
0
answers
28
views
How to read `DeclaringType` from `JsonPropertyTypeInfo` in System.Text.Json?
I want to customize serialization based on the type of the property. To do that I would like to read DeclaringType from JsonPropertyInfo. This is an example from Microsoft documentation on how to ...
1
vote
1
answer
37
views
How to serialize into a specific format
Using YamlDotNet, how to serialize a byte[] like that [49,20,50]?
The yaml file I need is:
device:
name: device1
key: [49,20,50]
I have tried:
Defined the key as byte[], however, the ...