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

TL;DR: when my JSON array is converted to a list of Java objects, the null values in the JSON string is converted to 0 instead of staying as null. I want to keep them as null in the Java object. I ...
mrjayviper's user avatar
  • 2,440
0 votes
0 answers
59 views

Use case Say I have an HTTP endpoint that constructs an immutable object then sends that immutable object to multiple sinks. Maybe I send it to a couple of message brokers, other HTTP endpoints, a ...
BPS's user avatar
  • 1,691
0 votes
1 answer
68 views

I have this JSON snippet. My problem is the key under transactions{} in this example it is set to "Request ID 000002" However this is part of a response to an API request and that value ...
crokett's user avatar
  • 1,234
2 votes
1 answer
191 views

Hardware/Software setup: IDE: Eclipse IDE Version 2024-12 (4.34.0) JDK: jdk-21 OS: Windows 11 Pro 24H2 CPU: 12th Gen Intel(R) Core(TM) i5-12600KF Background/Project Configuration I created a ...
user4574's user avatar
  • 416
0 votes
1 answer
52 views

Here is the serializer for java.security.PublicKey: public class PublicKeySerializer implements JsonSerializer<PublicKey> { @Override public JsonElement serialize(PublicKey key, Type ...
Triet Doan's user avatar
  • 12.2k
0 votes
0 answers
47 views

I'm working on a C# native android project using net8.0-android34.0 as framework version and one of the projects in the solution imports those android libraries: <AndroidLibrary Update="Jars\...
Jesoo's user avatar
  • 104
2 votes
0 answers
53 views

Consider I have a large (potentially infinite) array of JSON objects: [ { "id": 41, "name": "foo" }, { "id": 42, &...
Андрей Щеглов's user avatar
0 votes
3 answers
71 views

How to get a JsonObject out of JsonArray by JsonObject key value? [{key: "one", value: "beach"}, {key: "two", value:"sky"}] In Javascript I would do arr.filter(...
DavidDunham's user avatar
  • 1,372
1 vote
1 answer
65 views

I have a data class: data class Example( @SerializedName("id") val id: String, @SerializedName("url") val url: String, @SerializedName("more") val ...
Garfieldmao's user avatar
0 votes
0 answers
122 views

As the title states I'm trying to serialize a mutable state data type into a JSON format using the Gson library so that it can be saved into a file. However, the application crashes every time I do so....
Bob Rasner's user avatar
1 vote
1 answer
381 views

I have upgraded my java azure function dependencies from Spring boot 3.3.0 -> spring boot 3.4.0 and using the below dependencies. com.microsoft.azure.functions:azure-functions-java-library:3.1.0 ...
Praveen's user avatar
  • 514
0 votes
0 answers
41 views

I have the below JSON. I want to be able to store it in an instance of a Java class. I think that I need a custom deserializer to do so. I have working code that can create JsonObject of the top ...
crokett's user avatar
  • 1,234
0 votes
0 answers
100 views

I'm getting an error: java.lang.ClassCastException: com.google.gson.internal.LinkedTreeMap cannot be cast to Profile: Below is the method where we are getting the exception, and we have tried ...
Varsha's user avatar
  • 49
0 votes
2 answers
57 views

What I do? I sent a GET request from Postman to Tomcat v9.0 with following data. { "diaryId":2, "userId":2, "createTimestamp":"2022-05-05 12:00:00", ...
黃奕捷's user avatar
0 votes
0 answers
45 views

I have this example json: { "base": { "data": "{\"ids\":[\"first-v1\",\"second-v2\"],\"version\":\"1\",\"...
Sharas's user avatar
  • 2,135
1 vote
2 answers
64 views

Task The remote server returns a response with a body: { done: true, response: { result: { // data } } } In case of an error, a response with 200 status and a ...
Viewed's user avatar
  • 1,453
-5 votes
1 answer
136 views

Using java and GSON, I want to deserialize my POJO class @Data public class Book { @SerializedName("id") private String id; @SerializedName("tags") ...
a3dsfcv's user avatar
  • 1,294
0 votes
1 answer
88 views

I need to parse JSON data received from an external API and persist it using JPA annotations. I used GSON as the parser, along with a TypeAdapter, because the model has the following simplified ...
J Robes's user avatar
  • 487
0 votes
0 answers
195 views

Getting below error when trying to run my SpringBoot project which implements the SpotifyAPI from MichaelTheLin: java.lang.NoSuchMethodError: 'com.google.gson.JsonElement com.google.gson.JsonParser....
AlexNazemi's user avatar
0 votes
1 answer
143 views

What is the correct way to load and use a library with Maven? I am trying to use the Gson library for my GUI project, but doing so I get errors. These are my steps: Creating the Maven project works ...
Socrates's user avatar
  • 9,724
0 votes
0 answers
97 views

I am having a dateField which is in this format and of type java.time.LocalDate - "dateField":"2024-06-11" in one of the classes. Class is "ObjectClass" I am trying to ...
user2868864's user avatar
1 vote
2 answers
294 views

I am trying to convert response string into a java object (of Temp Class) for further manipulating but I get below error: Exception in thread "main" com.google.gson.JsonSyntaxException: ...
Lyrk's user avatar
  • 2,050
0 votes
1 answer
184 views

Hello i'm creating a rest server using ktor in my android application. It works really well but when i do a call i receive all the data but i don't get null data. What should i do to receive them. ...
alpheonix's user avatar
  • 325
0 votes
1 answer
63 views

I'm making an android app with Kotlin and compose and I'm using GSON to parse some JSON that I retrieve from an API. The data is then put into a list and returned from the function. I have a ...
George Clensy's user avatar
0 votes
1 answer
87 views

Recently I have been working on project which includes working with API. I have checked it in Postman and I am sure that its response is an Array of Objects but when tried to use it I faced Expected ...
nima's user avatar
  • 15

1
2 3 4 5
197