33,544 questions
0
votes
1
answer
257
views
Kotlin serialization of a HashMap
Got an issue with kotlin serialization where I could need some help:
import kotlinx.serialization.json.Json
fun main() {
val someValue: Double = 1.0
val someKey: String? = null
...
0
votes
0
answers
136
views
Performance issue (long serialization time) with Django rest framework serializers on large dataset like 1000 objects while fetching (read) the data
I am working on a Django application that uses Django Rest Framework to expose APIs. I am experiencing significant performance issues when serializing large data in Django Rest Framework. I have an ...
0
votes
0
answers
102
views
Converting FHIR Json to Google proto generated model
We have the FHIR JSON model which needs to be serialized using protobuf but we are not able to serialize it as the JSON is not getting parsed to the generated google fhir models.
https://github.com/...
0
votes
1
answer
67
views
Have an object serialize itself
With either JSON or Pickle, I can instantiate an object and save that object like so:
import pickle
thing = Thingy(some_data) # takes a while...
# ... do stuff with thing then save it since it mostly ...
0
votes
1
answer
57
views
Item name and lore de/serialization
For some reason when setting a item's name/lore using custom ChatColors via the Bukkit API(aka ItemMeta#setDisplayName()) and then later checking its NBT, it formats the NBT using redundant formatting ...
0
votes
0
answers
50
views
Difference in debug and regular Java serialization in VS Code
I'm serializing and deserializing a large sequence of arrays in Java.
All I previously had to do was add implements Serializable to my classes and it all worked.
Now, when I try to run the same code ...
0
votes
1
answer
120
views
JaxRS: Generating incomplete JSON, Unable to serialize property 'finalScores' from FinalScoreResponse
I have an endpoint that when called gives this error:
2024-10-23 12:21:14,135 SEVERE [org.ecl.yas.int.SerializationContextImpl] (executor-thread-3) Generating incomplete JSON
2024-10-23 12:21:14,136 ...
-1
votes
1
answer
133
views
Serializing a Complex python Class to JSON
In my project I analyze the questions of a given exam. Let's say each exam has 10 questions.
For each question I compute some stuff and save it, using the constructor method of class QuestionData (...
0
votes
1
answer
32
views
Serialize documents with the same name but different properties into one class
I'm trying to read two Aux files with one class, but I'm having trouble.
I'm getting an error when I try to serialize my class. The xml schema is defined by a third-party and I can't change it.
The ...
1
vote
1
answer
414
views
How to convert Java serialization data into JSON?
A vendor-provided application we're maintaining stores (some of) its configuration in the form of "Java serialization data, version 5". A closer examination shows, that the actual contents ...
1
vote
2
answers
121
views
Symfony serializer with array of entities
I have 2 DTO objects and I need to convert json to it:
class SomeDTO
{
public function __construct(
#[SerializedName('some_property')]
private string $someProperty,
#[...
0
votes
1
answer
48
views
Data serialization not mapping variables
My code is supposed to make an weather API call and store the data into data classes using serialization, however the data in the Log is null. When I remove the serial names and just name the variable ...
0
votes
1
answer
34
views
JSON Serialize for Following User
I have model.py as the following:
class User(AbstractUser):
pass
def serialize(self):
return {
"userid" : self.user.id,
"username": self....
0
votes
0
answers
31
views
How to properly restore system state after shutdown in Java using Restore class?
Problem:
I am working on a Java project where I need to restore the system state after a shutdown caused by an event (such as a PowerOut or WindowMalfunction). When the system is restored, it should ...
0
votes
1
answer
201
views
UnicodeDecodeError: 'UTF-8' codec can't decode byte 0xff in position 0: invalid start byte. DRF
There is a backend on django and a postgres DB that stores data about the item, including pictures. And there is a problem with getting a picture from the database, i've looked at enough solutions, ...
0
votes
1
answer
107
views
Why is my Custom date class not serialisable
I have the following custom date class in my current Android application
import kotlinx.datetime.LocalDate
import kotlinx.datetime.format
import kotlinx.serialization.Serializable
import shared.dates....
0
votes
1
answer
154
views
C# .NET: Deserialize JSON array into IList<Interface> with System.Text.Json
I'm removing Newtonsoft.Json from a project and replace it with an implementation of System.Text.Json.Serialization.
The old model uses a JsonArrayAttribute in combination with CustomCreationConverter&...
1
vote
0
answers
57
views
How to conditionally seriaize nested class with System.Text.Json?
I am looking to serialize a nested class on condition that value of an attribute is different than some custom value.
I was looking at: https://devblogs.microsoft.com/dotnet/system-text-json-in-dotnet-...
1
vote
2
answers
372
views
Unresolved import 'serde', cannot determine resolution for the derive macro `Serialize`, import resolution is stuck
I wanted to implement saving of my neuralnetwork after it is trained to file and subsequentially also loading of the file. However I ran into this error and I am really stumped as to what is the issue,...
0
votes
2
answers
41
views
How to add fields to serializer
I would like to add foreign key fields to DRF serializer. I need API endpoint with information of Publication details with all Comments to this publication with all Images to this publication and with ...
1
vote
0
answers
186
views
Serialize header parameter as json instead of using toString() with openapi-generator-maven-plugin
I am trying to use the openapi-generator-maven-plugin java generator to serialize a complex object as JSON instead of serializing the object using the toString.
I can't figure out how to make the java ...
4
votes
1
answer
130
views
Is Serializing Floats Necessary for Cross-Platform Network Code?
I'm reading this guide about network programming, which I'm liking a lot: https://beej.us/guide/bgnet/html/split/slightly-advanced-techniques.html#serialization
I'm confused about something though. In ...
0
votes
1
answer
45
views
Different name of serializer data django
I want to serializer a list of dicts that contain a whitespace.
Obviously I can't write cat name = serializer.Charfield(...) in Python
(see the space between the and cat).
So, I tried source=, but I ...
-1
votes
2
answers
26
views
Trying to skip one level when generating Json from wrapper class that contains two classes
So I have this domain class in a spring boot app for a REST API, that contains two subdomain objects:
public class Maximize {
private Profit profit;
private Stats stats;
...
The ...
0
votes
2
answers
55
views
C++ accessing global variables in a lua_State
I am currently building a program that lets me implement Lua scripts.
I want to get into serialization of those scripts, by accessing only the global variable of a lua_State by name and by value.
My ...