gson Questions
3
Solved
I use jQuery DataTables and get this warning message:
DataTables warning: table=userTable - Invalid JSON response
A servlet fetch users from MySQL which I want to display in a jQuery Datatable...
Melamine asked 7/11, 2015 at 11:26
3
Solved
Crashes in Firebase Crashlytics appear with a note how to fix a problem:
Fatal Exception: java.lang.IllegalStateException: TypeToken must be created with a type argument: new TypeToken<...>()...
Boiardo asked 11/5, 2023 at 7:7
3
Solved
Application crash when I try to insert list of Songs into Playlist class.I am using new Android studio version Flamingo and type coverters for converting list of model class.
This is my Converter c...
Sagerman asked 30/8, 2023 at 10:37
3
Solved
I have a org.json.JSONObject object.
What's the easiest way to create a gson.JsonObject object from it?
Thanks
Giltzow asked 6/8, 2015 at 22:29
5
How do I remove some fields with a specified name from a JSON string recursively ?
For example, I want to remove the field "secondName" from the following JSON:
INPUT:
{
"name" : "abc",
"secon...
4
Solved
I'm trying to follow a tutorial about Android application. I'm using an dependency Fuel (which has a dependency to com.google.Gson deserializer). But Gson() is not imported by IDE.
I've tried to s...
9
Solved
I am facing a weird issue in the release build of the app.
Here's my exception
Fatal Exception: java.lang.NullPointerException`
throw with null exception
in.hopq.hopq.authentication.models.AppUpda...
Isoelectronic asked 15/5, 2019 at 5:13
3
Solved
By default Gson uses fields as a basis for it's serialization. Is there a way to get it to use accessors instead?
10
I have json object with arbitary values inside. And I want to deserialize it in a Map. Everything is ok except converting integers to a doubles. See example:
{"id":1, "inner_obj":{"key":"value","n...
6
Solved
I'm retrieving a json and when I convert it to List using gson, the app crashes. The proguard is on and the problem is there.
fun getQuestions(): List<Question>? {
val json = getQuestionsJso...
3
I am dealing with a situation where I have polymorphic classes that I need to deserialize.
Class Pen{
String name;
List<Animal> animals;
}
//Animal can be an interface or parent class: I ...
17
Solved
What is this error ? How can I fix this? My app is running but can't load data. And this is my Error: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
This is my f...
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
1
In my java application i was using REST API that returned data in JSON format, and noticed that this particular API formatted it's dates in a peculiar way: "Nov 1, 2019" , But problem is that the a...
9
Solved
Retrofit 2 example tutorial but GsonConverterFactory display error "Cannot resolve symbol"
I'm trying to follow Retrofit's 2 tutorial, but on this part of the code there is a GsonConverterFactory that displays error Cannot resolve symbol:
public class ServiceGenerator {
public static ...
Casillas asked 23/10, 2015 at 14:9
24
Solved
I have this method:
public static Object parseStringToObject(String json) {
String Object = json;
Gson gson = new Gson();
Object objects = gson.fromJson(object, Object.class);
parseConfigFromO...
5
I am having a hard time with GSON.
I have a simple JSON that I want to deserialize to a Map<String,Object>.
It's really intuitive to me that 123 should be parsed as an int (or long), 123.4 ...
3
Solved
When I use
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
everything works perfectly.
But if change...
6
Solved
I have a class called Game:
public class Game {
private String name;
private int id;
private GameFields[] gameFields;
@Expose(deserialize = false)
public ArrayList<Player> players = new...
12
Solved
I'm trying to parse a JSON string like this one
[
{
"updated_at":"2012-03-02 21:06:01",
"fetched_at":"2012-03-02 21:28:37.728840",
"description":null,
"language":null,
"title":"JOHN",
"url"...
15
Solved
I want to be able to access properties from a JSON string within my Java action method. The string is available by simply saying myJsonString = object.getJson(). Below is an example of what the str...
8
Solved
I need send a json to my webservice, json is:
{
"Sala": {
"usuario": "%@",
"adversario": "%@",
"atualizacao": "%@",
"device": "%@",
"device_tipo": "ios"
}
}
. I'm trying do it using Retr...
4
Solved
6
Solved
I have an object with the following attributes.
private final String messageBundle;
private final List<String> messageParams;
private final String actionBundle;
private final Map<String, ...
Cartel asked 28/8, 2012 at 14:20
20
Solved
I'm migrating from using Volley to Retrofit, I already have gson class that I used before for converting JSONObject response to a object that implements gson annotations. When I'm trying to make a ...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.