Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moshi error Expected name at path $.foo.bar

Tags:

moshi

This Moshi error message: com.squareup.moshi.JsonEncodingException: Expected name at path $.foo.bar

is not really very helpful in identifying the cause of the problem.

like image 525
Maks Avatar asked Sep 13 '25 18:09

Maks


1 Answers

Turns this is due to a trailing comma in the JSON.

There is a fix in the works but i the meantime it might be helpful to document this here as Googling for the error message did not immediately lead me to the PR.

like image 173
Maks Avatar answered Sep 15 '25 20:09

Maks



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!