8,202 questions
1
vote
0
answers
402
views
How I deserialize Avro from Kafka with spring boot 2.7.18
I am trying deserialize an AVRO data to an object. But I get en error when deserializing with KafkaDeserializer or with custom deserializer.
Custom deserializer:
@Log4j2
@...
1
vote
2
answers
29
views
how to fetch data when package structure deleted in source, but in couchbase document, _class with old package structure is present
Few of the mapper classed moved to different packages, so how I can I retrieve the old documents with _class in my couchbase document.
Hi, I tried to follow the steps related to couchbasetypemapper, ...
0
votes
1
answer
168
views
How to deserialize json to C# class with arbitrary number of values and attributes
I'm trying to consume some JSON files, which could contains a arbitrary number of child values.
By simplifying the JSON, I get something like:
{
"timestamp":1710415627927,
"parent":...
0
votes
0
answers
108
views
Multithreaded deserialization using BinaryFormatter
Multithreading deserialization using BinaryFormatter or MessagePack is not giving me the performence boost I expect and I'm trying to understand why. Deserializing all chunks at the same time is ...
0
votes
1
answer
57
views
Ruby Serialising and deserialising json
I have this two function to serialise and deserialise game state. I got it working okay. But It feels very cluttered and messy. Is there a better approach of doing this?
There is two different class ...
0
votes
3
answers
2k
views
Serialize/Deserialize case insensitive map using jackson ObjectMapper
I am trying to use Jackson's ObjectMapper class to serialize an object that looks like this:
TreeMap<String, String> mappings = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
but when the ...
3
votes
1
answer
241
views
How to serialize/deserialize std::chrono::zoned_time?
The std::chrono::zoned_time is not a POD type (since it's not a trivial type) and so it cannot be written/read to/from a file as a sequence of raw data. It has a time point member (std::chrono::...
1
vote
1
answer
293
views
How to deserialize a data class that contains another data class
I have two data classes A and B
data class A(val b: B, val text: String)
data class B(
@JsonProperty("b") val number: Int,
@JsonProperty(access = JsonProperty.Access.READ_ONLY) val ...
1
vote
1
answer
106
views
Deserialize String to MacAddr6 in toml file
I have a toml file with pairs id and mac like this:
[[component]]
id = 1
mac = "d4:d7:04:c9:85:a4"
[[component]]
id = 3
mac = "3c:21:ee:b4:0d:ab"
[[component]]
id = 6
mac = "...
0
votes
1
answer
40
views
Do bytebuffer serializers optimized to the bit level (simillar to protobuff) exist?
I work at an environment where alot of data is passed via udp, serialized to bytes.
Currently we work hard to optimize our structures to be efficient, but it comes with a cost - time and serialization/...
-1
votes
2
answers
74
views
Could not generate .JSON file after performing Serialization in C# [duplicate]
Here from the following code, I want to generate JSON file using Newtonsoft.Json.Linq Serialization. But in my case It just runs the program on console and could not generate .JSON file.
public static ...
0
votes
1
answer
89
views
Binding form from Frontend (angular) to model in backend ASP.NET Core
I'm having problems binding array of objects to a list in my backend. Everything binds correctly beside that one array.
Here are photos of my problem notice that list of PrepTimes is null:
Controller ...
0
votes
0
answers
64
views
Model loaded in Flask app returns NameError for packages
I'm using a classification model (NLP pipeline) in my flask app (app.py). It saves and loads fine with dill. However, when the model is actually called, the app returns a NameError, which leads me to ...
0
votes
0
answers
38
views
How to create database software with custom extension to save and reload later with C# WinForm App
I am working on a project to create a software to keep some data and then export it to pdf files. To do that, i am using sql database and windows winform app. Because of being new to such things, i am ...
0
votes
0
answers
299
views
How to deserialize protobuf to custom object
Im trying to figure out with gRPC.
I send stream data from grpc server to client.
greet.proto:
message protoTagValueDouble {
int64 TagId = 1;
google.protobuf.Timestamp DateTime = 2;
...
1
vote
1
answer
174
views
.Net 7,8 System.Text.Json Deserialize Polymorphic Parameter
I have a class structure I can Serialize and Deserialize no problem. I have demonstrated it below in a contrived example
[JsonDerivedType(typeof(Apple),typeDiscriminator: "apple")]
public ...
0
votes
1
answer
88
views
how to deserialize a session data inside a 'click event' , that the session data is received from another function?
public partial class PaymentForm : System.Web.UI.Page
{
public class CartItem
{
public string name { get; set; }
public decimal price { get; set; }
public int quantity { get; set; }
...
0
votes
0
answers
86
views
Duration of binary serialization increased after serialize and deserialize an object in json serialization
I've used NewtonSoft.Json to serialize an object and save it into a file. This object contains the whole data of a project created in my software. I read this file (deserialize) and create my project ...
0
votes
0
answers
191
views
Spring kafka deserialization issue
When I send a message that is not expected type,
The same log will be repeated.
java.lang.IllegalStateException: This error handler cannot process 'SerializationException's directly; please consider ...
1
vote
2
answers
124
views
c# Newtonsoft Deserialize Json into object depending on properties
Im in a situation where I am receiving Json that can be in two different formats and I am trying to find a good way to deserialize it into their respective objects. I have one Json string that would ...
0
votes
1
answer
334
views
How to deserialize multiple json fields into single object with kotlinx serialization
Consider the following json structure representing a basic check-in information
{
"id": "53481198005",
"date": "1995-01-01 00:00:00",
"latitude":...
2
votes
2
answers
788
views
System.Text.Json dictionary deserialisation as constructor parameter with reference id
I am using .NET 8 and try to deserialize a class with a [JsonConstructor] that has a Dictionary<string,int> as parameter.
But this always fails with this error:
Reference metadata is not ...
0
votes
1
answer
62
views
JsonSerializer deserialize as simple type
My JSON looks like this. Values can only be numeric, string or null:
attributes: {
"value1": "name",
"value2": 123,
"value3": null
}
When ...
2
votes
0
answers
455
views
serde_json: Deserialize deeply nested JSON object [duplicate]
Problem
I'm parsing an JSON API response I can't control with rust and serde_json.
The response looks like this (some fields truncated):
{
(... other fields)
"contentJsons": {
"...
0
votes
0
answers
97
views
How to change @JsonProperty name on the go depending on which API is call?
I'm encountering an issue with dynamic field name changes during JSON deserialization using Jackson in a Spring Boot application. The field name in the JSON data can change dynamically based on ...