Skip to main content
The 2024 Developer Survey results are live! See the results

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
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 ...
Mohit Jain's user avatar
  • 30.5k
-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 ...
Matt's user avatar
  • 1
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, }; ...
Nicolas's user avatar
  • 6,404
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 ...
oldMonk's user avatar
  • 95
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> ...
SuperSavior's user avatar
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 ...
Medyahya's user avatar
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 ...
Jai dewani's user avatar
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 ...
Mustafa Hashim's user avatar
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 ...
Jason C's user avatar
  • 39.9k
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 = "&...
Jarno's user avatar
  • 113
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 ...
RPAlbert's user avatar
  • 131
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 ...
Mike's user avatar
  • 1,300
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. ...
Hendrik Wiese's user avatar
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 ...
Ilya Chernomordik's user avatar
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 ...
Romer's user avatar
  • 71

15 30 50 per page
1
2 3 4 5
2232