Questions tagged as 'gson'

1
answer

Android App with Retrofit consuming of api does not show the list

Well, the fact is that I just want to show the name of the countries in a list, but I do not know how to get the name only: This is the main class: listView = (ListView) findViewById(R.id.list_view); textView = (TextView) findViewB...
asked by 27.11.2016 / 13:22
1
answer

Receive a single object of a class using JSON and parsing to java with GSON

I have a webService in PHP and MySQL that sends me a JSON with the data I need. The problem is that in the android activity I have always used this code to pair the JSON: Gson gson = new Gson(); p = gson.fromJson(result, new TypeToken<List&...
asked by 05.12.2018 / 18:08
1
answer

Problem when wanting to read JSON made PHP from Java

I'm trying to get a JSON from PHP, which returns the result of a query (SELECT) from a database. I am using GSON, to convert the obtained JSON to an object in Java. My problem is that it does not let me create the objects and returns an Ex...
asked by 19.10.2018 / 02:41
0
answers

De-serialize JSON

I'm working with an API that gives me a response in JSON format and I do not know how to deserialize the answer to get the values I need, I'm trying with the Gson library but I do not understand it, the answer I get in the following: [ {...
asked by 12.07.2018 / 07:25
0
answers

How to pass entities mapped with hibernate to JSON?

I am commenting I am working with hibernate, then I show an entity product of the mapping: public class Usuario implements java.io.Serializable { private String idUsuario; private Trabajador trabajador; //one to one private Strin...
asked by 14.06.2018 / 23:28
1
answer

How to get the number of elements that a JSON has with GSON in Java?

From the Front-end I send the file JSON , then in the Servlet , through GSON I transform it into an object: PrintWriter out = response.getWriter(); String texto = request.getReader().readLine(); Gson gson...
asked by 23.05.2018 / 20:50
0
answers

How to recover Java service JSON?

I am creating a REST service exposed from Java, I am working in Netbeans because I saw that it was much easier to generate the code from the database model that I have already defined and created, now the service works for me but I it returns al...
asked by 22.05.2018 / 22:00
1
answer

Recover Json field 2 level of array gson or Jackson

I have a Json with the following format: { "resultado": [ { "columa": [ "p" ], "datos": [ { "row": [ { "oficina": "0000", "entidad": "1234",...
asked by 01.08.2017 / 10:52
1
answer

Gson in Release works differently than in Debug on Android

I find that an app where I load data from json with library gson to a custom object list, in realease does not fill the list. What is due? This is my object: public class Route { private String title; public v...
asked by 22.11.2016 / 18:02