gson – java.time.format.DateTimeParseException: Text # 04-02-2019 10:59:30 # could not be parsed at index 0

I consume an Android service with retrofit. Through Gson, I serialize and deserialize the objects in the configuration of the date format. I use the following:

Gson Gson = new GsonBuilder ()
.setDateFormat ("DD-MM-YYYY hh: mm: ss")
.create ();

Invoking the service (built in Java with Netbeans) generates the following error:

java.time.format.DateTimeParseException: Text # 04 -02-2019 10:59:30 & # 39; could not be parsed at index 0
at java.time.format.DateTimeFormatter.parseResolved0 (
at java.time.format.DateTimeFormatter.parse (

Any idea?

Java – traverse a Json object with multiple array levels using Gson

I'm having trouble crossing a Json properly Gson bookstoreIt contains several array layers and I do not know how to cross the jSon array properly.

jSon – Multiple levels

"date_layout": "day-month-year",
"last update": 1547596830,
      "name":"Cleans Cuts",

What I would wish for are the IMAGES[transparent]What steps do I have to take to get the desired parameters?

What I have done are the following 2 model classes to get the Json data.

public class Datos {
public string date_layout;
public int lastupdate;
list items

public class members {
public string name;
// public ArrayList Items;

The comment // public ArrayList Items;I thought another nested list should be created, but it does not work that way. For this reason, comments are made.

public class MainActivity extends AppCompatActivity {
@Run over
protected void onCreate (bundle savedInstanceState) {
super.onCreate (savedInstanceState);
setContentView (R.layout.activity_main);

String url = "";

Request request = new Request.Builder ()
.url (URL)
.build ();

Answer Answer = client.newCall (request) .execute ();
if (response.isSuccessful ()) {
String response_jSon = response.body (). String ();
Gson Gson = new Gson ();
End dates data = gson.fromJson (response_jSon, Data.class);
for (int i = 0; i <enddata.items.size (); i ++) {
Log.d ("MESSAGE_2", Final_Data.items.get (i) .name);

At the moment the protocol shows only the Cleans cuts But there are still arrays that you can get to IMAGES[transparent]