33,523 questions
3
votes
1
answer
66
views
Serialising and Deserialising a System.Data.DataSet to XML with SQL Server UniqueIdentifier using different .NET versions
We have a legacy application that was originally written to connect directly to a SQL Server database using OLEDB.
Since then we have introduced Azure SQL databases (but some of our clients are still ...
2
votes
1
answer
68
views
How to set up Instant format with Jackson serialization/deserialization
I'm using jackson-module-kotlin:2.21.0 and jackson-datatype-jsr310:2.21.0.
I need to serialize (and then deserialize) java.time.Instant in specified format "yyyy-MM-dd HH:mm:ss"
(without ...
0
votes
0
answers
21
views
Redisson RMap.getAll() returns incorrectly deserialized objects for large batches, but works for small batches or single get
I am using Redisson RMap as a cache and fetching data in batches using getAll().
Original code
private static final int FETCH_LIMIT = 1000;
private void getResponseForSubsetOfKeys(Set<Object> ...
Advice
0
votes
2
replies
31
views
How can Unity YAML scene files be interpreted in an external runtime?
I'm working on an experimental project called NextLiber VRM, which attempts to interpret Unity scene files outside the Unity runtime.
Unity stores scenes in YAML format, including transforms, ...
2
votes
1
answer
125
views
C# XML Serialization: Merging multiple lists before saving
I am currently working on a small financial management application and use XmlSerializer to persist my data. I maintain a main list (allRecords) holding all data, and two separate lists (incomeList ...
0
votes
0
answers
35
views
Serialization with MSR 010B [Flush Command] in AMD CPUs for execution time measure
AMD Processor Programming Reference (PPR) for AMD Family 19h Model 70h, Revision A0 Processors says:
MSR0000_010B [Flush Command] (Core::X86::Msr::FLUSH_CMD)
Writes to this register do not execute ...
2
votes
1
answer
150
views
Newtonsoft for ISerializable classes with a reference loop - use GetObjectData for serialization and ordinary constructor for deserialization
I have a couple of ISerializable classes (simplified):
internal interface IBase : ISerializable
{
int Number { get; }
}
internal interface ITable : IBase
{
ISection Section { get; }
}
[...
3
votes
1
answer
171
views
Deserialization via Newtonsoft for classes with a reference loop, private constructors and private/internal properties setters
I have a couple of classes (simplified):
internal interface ITable
{
int Number { get; }
ISection Section { get; }
}
internal class Table : ITable
{
public int Number { get; private init; ...
2
votes
1
answer
70
views
Django / Serializer - How to pass label attached to choice field in API?
I am trying to get the label attached to the relevant interger for the choice field. Although the API returns the interger, I cannot seem to be able to return the actual label value.
This is the ...
1
vote
1
answer
287
views
Serializing of polymorphic json in ASP.NET Core 10
I want to use polymorphic JSON for the RichText type in .NET 10 because I plan migrating from one richtext format to another and I am stuck with a problem: when the object is automatically serialized ...
-1
votes
1
answer
58
views
Unity UWP build: “A scripted object probably BlankScene has a different serialization layout” when using [SerializeField]
I'm encountering a serialization error when building a Unity project for UWP and running it in Visual Studio:
A scripted object probably BlankScene has a different serialization layout when loading (...
1
vote
1
answer
268
views
kotlinx-serialization-json 1.9.0 library causes compile error "Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin."
After adding the dependency org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0 I tried using it like this:
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.Json
@...
0
votes
1
answer
53
views
KafkaAvroSerializer UnresolvedUnionException with nullable timestamp-millis field
I'm using confluent's KafkaAvroSerializer with a schema that includes a nullable timestamp-millis field. The field maps to Instant in Java, but when I send a non-null I get an UnresolvedUnionException....
1
vote
1
answer
126
views
Callback methods with ProtoBeforeSerialization/ProtoAfterDeserialization donot work in protobuf-net 3.2.26, even when assigned explicitly to MetaType
I'm upgrading from protobuf-net 2.2.1.0 to 3.2.26, and I've noticed that callback methods decorated with [ProtoBeforeSerialization] and [ProtoAfterDeserialization] are no longer invoked during ...
7
votes
1
answer
156
views
Records don't deserialize cycles
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 ...