All Questions
Tagged with json serialization
6,935 questions
-1
votes
2
answers
74
views
How to deserialize JSON object with nesting [closed]
I am trying to deserialize a JSON object:
{
"columns":"1",
"ctrl":{
"height":"24",
"offcolour":"#ff000000",...
1
vote
0
answers
57
views
How to deserialize JSON in C#? Is the input format data correct? [duplicate]
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()
{
...
0
votes
0
answers
47
views
C# When deserializing a Json, how to avoid a specific property being deserialized into? [duplicate]
Having trouble finding the right way to describe the issue to find a solution for it. But here's a quick rundown.
I'm using Newtonsoft Json plugin for the following:
A Json is being deserialized based ...
0
votes
0
answers
66
views
Is there a way in TypeScript to do custom JSON deserialization within a class?
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 ...
3
votes
0
answers
86
views
How can i fix a deserialization problem with Rust Serde? [closed]
I have a code that tries to deserialize a json response into a struct, the struct is like this:
pub struct Message {
pub body: String,
#[serde(rename="sendAt")]
pub send_at: ...
0
votes
1
answer
70
views
Deserialize JSON with multiple variable names to VB.NET object
I currently am trying to deserialize a JSON-object to a VB.NET-object. But I am not able to do that properly - but I guess I know the reason for it. Here is an example of my JSON-object:
{
"...
0
votes
1
answer
130
views
reflect-cpp doesn't work with anything but basic structures
I'm not sure if this is normal, but at this point I'm kind of expecting any serialisation in C++ to be hit or miss. I'm trying to use the reflect-cpp library to serialise and deserialise json, which ...
0
votes
1
answer
68
views
Deserialization error when deploying Azure dashboard tiles using JSON array of objects parameter
I'm deploying Subscription-level cost analysis components into an Azure Dashboard and need assistance on a "deserialization" error. Each Subscription requires two cost perspectives displayed ...
2
votes
3
answers
125
views
Why does an inherited class not get JSON serialized correctly?
I want to create a JsonSerializable class, that I can inherit from. See this code:
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
public interface IJson
{
string ...
0
votes
1
answer
35
views
Gson custom serializer for PublicKey is never called [duplicate]
Here is the serializer for java.security.PublicKey:
public class PublicKeySerializer implements JsonSerializer<PublicKey> {
@Override
public JsonElement serialize(PublicKey key, Type ...
1
vote
1
answer
103
views
Problem with serializing object structure with Newtonsoft Json.NET
I have to serialize a data structure for a 3rd-party interface either to XML or to JSON. The expected result should look like the following (simplified) example:
XML:
<?xml version=\"1.0\"...
1
vote
1
answer
70
views
TypeError: Object of type ndarray is not JSON serializable despite custom converter (Nested Dict/NumPy 2.0)
I am working with simulation results stored in a deeply nested defaultdict structure. This structure (data_to_save) mixes standard Python types (lists, ints, floats, None) with NumPy arrays.
I need to ...
-1
votes
1
answer
51
views
FluentAssertions - Should().BeEquivalentTo() reports different length on equal strings
In a unit test, I am comparing JSON output from a serialization operation.
It's very simple, I just compare raw strings with each other. Now, the strings do visually match, but my testing framework, ...
0
votes
0
answers
23
views
Kivy JsonStore: can you customize its encoder that converts data structures to/from .json format?
I'm adding storage to my python Kivy application.
My data involves many enums and nested dictionaries/sets so out-of-the-box, JsonStorage fails with errors like "TypeError: Object of type set is ...
-2
votes
1
answer
71
views
In go, how can I flatten a map when serializing? [duplicate]
I have a go codebase full of structures that look like
type MyStruct struct {
SomeField int
SomeField2 string
// ...
SomeMap map[string]SomeOtherStruct
}
and I need to serialize this to ...