1

My server return this JSON String but seems like the syntax is not right. (I use Retrofit to get that json but it show JsonSyntaxException at expiresTime field. ). Could anyone check it for me:

{"messageId":1,"message":"new","expiresTime":"Fri Mar 04 02:12:39 GMT+00:00 2016","senderId":2,"userId":1}

This is image when I call that API by browser:

enter image description here

UPDATE:

Please take a look at my old question: Here

Community
  • 1
  • 1
Bui Quang Huy
  • 1,784
  • 2
  • 17
  • 50

1 Answers1

1

The entire string needs to be 1 line. You have 2 lines which is why its throwing the error for you. Output should be like:

{"messageId":1,"message":"new","expiresTime":"Fri Mar 04 02:12:39 GMT+00:00 2016","senderId":2,"userId":1}

Similar questions:

Community
  • 1
  • 1
Aziz Saleh
  • 2,687
  • 1
  • 17
  • 27