deserialization Questions
4
Solved
I have a .NET minimal API project, as described here. One of the endpoints accepts JSON in the request body, and this is deserialized automatically. The code looks something like this:
app.MapPost(...
Cockloft asked 15/9, 2023 at 7:51
5
Solved
I have the following declaration in my object:
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSX")
private ZonedDateTime start;
And when I parse timestamps like ...
Maestricht asked 8/12, 2016 at 10:32
9
Solved
kotlin 1.2.10
jackson-module-kotlin:2.9.0
I have the following data class in kotlin:
data class CurrencyInfo(
@JsonProperty("currency_info") var currencyInfo: CurrencyInfoItem?
)
@JsonInclude(J...
Chinch asked 26/12, 2017 at 18:8
4
Solved
I have a struct containing a byte array that I would like to serialize and deserialize to and from binary, but it only works for arrays up to 32 elements.
Here is my minimal example code
main.rs:
#...
Stopping asked 14/2, 2018 at 7:45
3
Context: I need to pass an object containing a large number of properties/fields (to UI Layer from Middle Tier Layer). Among this list of properties, one is of type Version which is not getting des...
Caressive asked 1/11, 2012 at 3:6
5
Solved
I have used the "JsonConvert.Deserialize(json)" method of Json.NET so far which worked quite well and to be honest, I didn't need anything more than this.
I am working on a background (console) ap...
Perseverance asked 26/8, 2015 at 13:3
3
Solved
I get an exception when I try to deserialize to an object from a JSON string.
Input string '46.605' is not a valid integer. Path 'LatitudeCenter'
It's really weird because JsonConvert tries to de...
Caisson asked 29/12, 2015 at 18:15
6
Solved
I have a class with an internal list. I don't want the user of this class to be able to interact with the list directly, since I want to both keep it sorted and to run a calculation (which depends ...
Pegeen asked 9/12, 2014 at 19:20
4
Solved
Is it possible to serialize / deserialize flatbuffers to and from JSON?
What I really want to do is to save flatbuffers as JSON, allow people to change whatever value they want, then read back JSO...
Composition asked 11/1, 2018 at 21:17
2
Solved
I use Jackson to deserialize a JSON to an immutable custom Java object. Here is the class:
final class DataPoint {
private final int count;
private final int lower;
private final int median;
p...
Marnamarne asked 5/5, 2017 at 11:29
19
I have the following code:
var user = (Dictionary<string, object>)serializer.DeserializeObject(responsecontent);
The input in responsecontent is JSON, but it is not properly deserialized int...
Bamberg asked 8/7, 2011 at 5:3
2
Solved
I run simple deserialization into own type Event with :
JSON.Deserialize<Event>(text);
with exception:
An exception of type 'Jil.DeserializationException' occurred in Jil.dll but was not ...
Lederer asked 9/4, 2015 at 10:37
7
Solved
I have some problems with implementation of Json Deserialization in my Android application (with Gson library)
I've made class like this
public class MyJson<T>{
public List<T> posts;...
Berlioz asked 23/8, 2013 at 7:36
7
I have a rather large dict (6 GB) with a structure along the lines of:
{((('word','list'),(1,2),(1,3)),(...)):0.0, ....}
and I need to do some processing on it. I'm trying out several document clu...
Adelaadelaida asked 20/5, 2009 at 22:2
8
I have a class that looks like
class MyClass {
private byte[] payload;
public MyClass(){}
@JsonCreator
public MyClass(@JsonProperty("payload") final byte[] payload) {
this.payload = payload...
Tipple asked 8/10, 2018 at 19:20
3
Solved
I've got a C# application that uses Json.NET v7.0.1. As a result of a REST call, I get back some JSON in the form of:
{
"messages": [ {"phoneNumber":"123-456-7890", "smsText":"abcd1234="},
{"phon...
Sealey asked 20/8, 2015 at 15:40
5
Whats the best way to write a deserialize function to convert a byte array into a 32 bit unsigned integer?
typedef unsigned long uint32;
uint32 deserialize_uint32(unsigned char *buffer)
{
uin...
Keshiakesia asked 26/5, 2011 at 21:36
6
Solved
I have two format of JSON which I want to Deserialize to one class.
I know we can't apply two [JsonProperty] attribute to one property.
Can you please suggest me a way to achieve this?
string jso...
Junie asked 1/5, 2017 at 3:55
4
Solved
I'm trying to deserialize a JSON file to a c# class. However, my deserialize method always returns null.
My JSON file looks like this-
{
"Products": [
{
"ProductID": 994,
&q...
Surgeon asked 25/1, 2021 at 17:37
4
Solved
I am passing in a valid JSON object to my controller on my .net core 3 web api application. Doing so, I get the error:
System.NotSupportedException: Deserialization of interface types is not sup...
Aubin asked 5/12, 2019 at 20:47
2
I supposed that I had a parent Class Parameter that has 2 sub classes ComboParameter and IntegerParameter
@JsonSubTypes({
@JsonSubTypes.Type(value = IntegerParameter.class, name = "integerParam")...
Mcgannon asked 11/3, 2015 at 17:11
4
Solved
I get the following error when I want to send an AVRO message which contains a field that has the type long:
Caused by: org.apache.kafka.common.errors.SerializationException: Error deserializing A...
Passed asked 18/12, 2017 at 11:48
5
Solved
I have a datetime that I save to a file like this:
time1 = datetime.datetime.now()
f.write(str(time1))
Now when I read it I realize time is a string. I've tried different ways to convert it but ...
Modla asked 13/11, 2012 at 6:54
2
Solved
I have an ASP.NET Core OData Web API with an endpoint that returns the following:
{
"@odata.context": "https://localhost:44305/odata/$metadata#OrgUnits",
"@odata.count&qu...
Heartthrob asked 14/9, 2021 at 12:13
4
Solved
Given a yaml with a map of items,
items:
item1:
uid: ab1234
foo: bar
item2:
uid: cd5678
foo: baz
how can I parse it with serde into a Vec<Item> with a new field, "name", gene...
Icebreaker asked 27/11, 2023 at 5:52
1 Next >
© 2022 - 2025 — McMap. All rights reserved.