Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
26 views

I'm using Spring MVC and I would like to control the deserialization of Date objects in RequestBody. I saw I can set a custom JsonDeserializer in the input object, but I would like to set a global ...
Tobia's user avatar
  • 9,617
0 votes
4 answers
112 views

I used to have simple classes like below: public class Product { public Money Price {get; set;} } public class Money { public decimal Amount {get; set;} public CurrencyEnum Currency {get;set;...
Ceres's user avatar
  • 73
0 votes
1 answer
136 views

I have a couple of classes (simplified): internal class OrderItem { public string Name { get; set; } public Order Order { get; set; } } internal class Order { public IReadOnlyList<...
bairog's user avatar
  • 3,539
4 votes
1 answer
99 views

I'm attempting to deserialize an XML response from an API. The data is as follows (I have only included a small chunk for the sake of a small post): <ns1:alerts xmlns:ns1="http://gov.fema....
alexjusti's user avatar
-3 votes
1 answer
79 views

Everything works as expected until the json string is deserialized after the post back. Class: public class RegretLetterDetail { public int PositionID { get; set; } [Display(Name = "...
Danie Schoeman's user avatar
7 votes
1 answer
153 views

I stumbled upon something that got me curious. Apparently, serializing a record with a cyclic reference does not retain the cycle when deserializing it again, it becomes null. When doing the same ...
Zabuzard's user avatar
  • 26.3k
0 votes
1 answer
258 views

I want to use JSON to serialize and deserialize a complex Python object. This Python object contains other Python objects that may be implementations of a protocol or descend from a common abstract ...
Green 绿色's user avatar
  • 3,213
2 votes
2 answers
110 views

In this thread, (de-)serializing a nested polymorphic object is described for open (runtime) polymorphism. How can the same be achieved for closed (static) polymorphism? That is, how can a ...
Noah's user avatar
  • 3,567
1 vote
2 answers
115 views

I am trying to load data from Java object streams from another application. Since I do not have access to the source code of that application, I used jdeserialize to extract the class definitions from ...
uli's user avatar
  • 71
0 votes
0 answers
41 views

I am working with XML serialization in C# where I have multiple versions of a message class that inherit from each other. Here’s a simplified version of my code: namespace XMLSerializeProblem.Base { ...
Yash2304's user avatar
0 votes
1 answer
110 views

I'm trying to set up a Spring Authorization Server for learning purposes. The login and consent screens work, but after I approve the consent screen and submit the /authorize request, I get the ...
Gaurav Kumar's user avatar
0 votes
1 answer
153 views

What happens to the model's eager-loaded relationship when the model is passed to another Job's dispatch method? Context: There is a job that retrieves all ongoing games and this job should create an ...
ssrsvn's user avatar
  • 33
1 vote
1 answer
81 views

I'm trying to serialize and compress a std::map using Boost. Here's the serialization code: #include <boost/archive/binary_oarchive.hpp> #include <boost/iostreams/filtering_stream.hpp> #...
Setu's user avatar
  • 1,086
0 votes
0 answers
266 views

I am using MessagePack version 3.1.4 for binary serialization/deserialization. With the most basic code and decorating my fields/properties with the Key attribute: public static byte[] Serialize<T&...
Yannick's user avatar
  • 323
2 votes
0 answers
119 views

I use pydantic to be able to serialise and deserialise json data stored in a large database. Each of these json strings represent a pydantic model MyModel. class MyModel(BaseModel): attr1: int I ...
A-Abe's user avatar
  • 75
0 votes
1 answer
130 views

I am new to python and came across a object deserialisation issue (unpickling) while testing a program on jupyter lab. I am trying to serialize and deserialize object of Employee class as below. - ...
Gunjan Shah's user avatar
  • 5,178
2 votes
2 answers
238 views

I have a class BaseClass that during runtime will store a reference to another object Thing. BaseClass is meant to be extensible so I've made it abstract like so: abstract class BaseClass{ // see ...
Andorrax's user avatar
  • 123
2 votes
2 answers
129 views

Preamble: I know about ISerializable deprecation. We have to use it because we have massive legacy codebase for IPC (that uses this interface). We are migrating from .NET Remoting to a crossplatform ...
bairog's user avatar
  • 3,539
1 vote
0 answers
61 views

I need to deserialize a JSON data containing list of players into a regular List<> type (in C#). My code is: public async Task<Player2> RetrievePlayerListFromServer() { ...
Krzysztof Tanaś's user avatar
0 votes
0 answers
101 views

The Goal I am working on a project where we have id's comming back from the server in a format that is a prefix followed by a guid (prefix_{guid}). This is so that we know what the specific ID type is ...
Kayden Miller's user avatar
1 vote
2 answers
223 views

I am trying to include the Spring4D framework in my latest Delphi project. The collection functions for sorting and filtering are the main features. However, I have great difficulty to serialize a ...
Edward's user avatar
  • 309
0 votes
1 answer
62 views

I have several sets of parameters that comes from client and I need to parse them. I make a custom class extended from a HashMap. It is parameterized with map key class which is enum itself. Using ...
kio21's user avatar
  • 721
2 votes
0 answers
86 views

So I have a class that implements a JavaFX ObservableMap which maps Integers to a generic type T, and I want to serialize that, but it happens that this is an abstract class and what I will in fact ...
Satoshi's user avatar
  • 43
1 vote
0 answers
57 views

I'm trying to write a generic deserializer function using serde for hex strings like "0xff" to convert into various unsigned integer types (u64, u128, etc). I want to make the function ...
narumi's user avatar
  • 77
1 vote
1 answer
158 views

I'm trying to deserialize JSON data into Animal.class and Dog.class which extends Animal.class using custom deserializer. The JSON data below is a simplified one and the real JSON data cannot be ...
evol1102's user avatar
4 votes
1 answer
143 views

I have some serialization code to persist an object into a DB. This works by mapping an enum value, representing the column, to a member of the class. The type information is preserved this way, so ...
user450775's user avatar
3 votes
1 answer
4k views

I am trying to use a pytorch model present on this link: https://drive.google.com/drive/folders/121kucsuGxoYQu03-Jmy6VCDcPzqlG4cG since it is used by this project I am trying to run: https://github....
rikyeah's user avatar
  • 2,118
0 votes
0 answers
84 views

I'm using Oat++ with custom enums for serializing/deserializing in DTOs and integrating them with a MySQL connector. I'm facing issues when mapping enums to/from JSON and database fields. I've tried ...
Aditya Hagawane's user avatar
0 votes
1 answer
83 views

I'm using Blazor wasm with .Net 8 and the Kontent.Ai.Delivery package and I'm trying to integrate caching into the system. One problem I'm facing is, after I store the data as json in cache, I can't ...
Đức Thành Nguyễn's user avatar
0 votes
0 answers
47 views

I used the following configuration code for consuming raw message in MassTransit with MassTransit.Newtonsoft library. For XML, the root element will be the same but the children properties will vary. ...
Kseniya Yudina's user avatar
0 votes
0 answers
59 views

I have code that has two warnings. The code is from a commandline Expense manager project that uses a List to save and access expenses. Saving and retrieving the List is done via serialisation and ...
Andruid929's user avatar
0 votes
1 answer
131 views

I have been trying to deserialize an XML file and pull out some data from StructuredText element of the XML. So far, namespace have been causing issues. I generated the classes with xsd from a schema ...
JohnnyHavlis's user avatar
0 votes
1 answer
135 views

How can I force serde to parse a JSON Number as a Rust u16 type? Below I parse a JSON file. json_data is of type Value. This only has a as_u64() method, no as_u16(). As a result I first have to parse ...
Baldrick's user avatar
  • 11.2k
1 vote
0 answers
136 views

I am using Java 21 with Spring Boot 3 and Spring 6 to send a custom object to an SQS queue. public class Event { String eventName; Instant dateTime; } My SQS message listener is set up as ...
Zoe's user avatar
  • 435
0 votes
0 answers
79 views

I have pydantic model as below. from typing import Annotated from bson import ObjectId from pydantic import Field from pydantic import EmailStr from pydantic import BaseModel from pydantic import ...
NPatel's user avatar
  • 21.4k
0 votes
0 answers
95 views

My XML <Parent> <childs> <child>1</child> <child>0</child> </childs> </Parent> Pojo Structure is class Parent { @...
stash's user avatar
  • 19
2 votes
0 answers
49 views

I'm working on serializations and need to make some benchmarks on Apache Thrift. But I have very long serialization times. Compared to Protobuf, I have more than 100x average times. What am I doing ...
Kuvalya's user avatar
  • 1,116
0 votes
0 answers
223 views

I connect to Solana websocket and subscribe to program data of Raydium decentralized exchange account (https://raydium.io/swap/) to listen to swap transactions. Current State I successfully connected, ...
josip's user avatar
  • 307
0 votes
1 answer
188 views

In a C# .Net application, is BinaryFormatter used to deserialize resource image data embedded in the application via .resx files and Resource Explorer? I've been handed a .Net application and the task ...
Matt's user avatar
  • 447
0 votes
1 answer
82 views

I am trying to parse this JSON $response body = {"low":{"networkFee":"0.00003"},"medium":{"networkFee":"0.0000428"},"high":{"...
Russo's user avatar
  • 3,250
6 votes
1 answer
90 views

I am interested in methods for serializing and deserializing a binary tree in breadth-first order. The first part, serialization, is equivalent to performing a levelorder traversal where we preserve ...
Brendan Langfield's user avatar
-1 votes
1 answer
81 views

I was suprised, that any valid json, even empty "{ }" can be deserialized by JsonConvert.DeserializeObject as any T class. The missing values will simply be default. To example, I can't do ...
Sinatr's user avatar
  • 22.3k
0 votes
1 answer
796 views

I have an API in Spring Boot. In the controller layer, any POST that has a custom object annotated with @RequestBody flags Snyk security findings in the security pipeline. For example: public ...
Ddeokbokki's user avatar
0 votes
0 answers
61 views

try (Response okHttpResponse = client.httpClient.newCall(request).execute()) { if (!okHttpResponse.isSuccessful()) { logger.severe("Error in calling Rest API : " +...
Mehul Parmar's user avatar
0 votes
0 answers
28 views

In Loading a DataSet from XML, I've found the following statement: If you call ReadXml to load a very large file, you may encounter slow performance. To ensure best performance for ReadXml, on a ...
exaiwitmx's user avatar
  • 119
1 vote
2 answers
154 views

Given a trivially constructible struct with alignment > 1, how can I create that struct with data from a buffer without calling the default constructor? enum class FoodType { Fruit, Veggie, ...
weineng's user avatar
  • 364
0 votes
1 answer
82 views

private <T> T convertByteInDataForObject(ByteString data, Class<T> toType) { byte[] bsonBytes = data.toByteArray(); ByteBuffer byteBuffer = ByteBuffer.wrap(bsonBytes); ...
faisal pathan's user avatar
-1 votes
1 answer
148 views

I have a function that calls API requests, and I want to have each request return its own data type according to its purpose. For that, I created a class called ApiResponse. Here is its code: ...
Avraham Cohen's user avatar
0 votes
1 answer
47 views

I'm trying to deserialize a GeoJson FeatureCollection contained in a file (.json extension), with contents: { "type": "FeatureCollection", "features": [ { &...
mekoda's user avatar
  • 353
0 votes
0 answers
42 views

I have two issues: I would like to make a generic lowercaseAwareSchema that can take a string as an input (not a dict, a string) and load the string along with its lowercase version in a dict I would ...
Tanav Gupta's user avatar

1
2 3 4 5
164