com.google.gson.JsonSyntaxException: duplicate key: UNRECOGNIZED


Samebug tips

Your json input might be invalid. Try checking it in a validator like https://jsonlint.com


3 months ago

Your custom gson deserializer might have a bug. Try to write a unit test that checks proper deserialization of only that class by forging a json that contains a single field of that type.


3 months ago

Solutions on the web

Solution icon of googlegroups
via Google Groups by Fred Dang Tran, 4 months ago
duplicate key: UNRECOGNIZED

Solution icon of github
via GitHub by SpeedrunnerG55
, 1 month ago
duplicate key: null

Solution icon of github
duplicate key: menu_creation_price_info

Solution icon of googlegroups
via Google Groups by Patrick Nolan, 1 year ago
duplicate key: Minecraft

Solution icon of github
via GitHub by narrowtux
, 7 months ago
duplicate key: factorio_version

Solution icon of github
duplicate key: factorio_version

Solution icon of github
via GitHub by MikoSphinx
, 1 year ago
duplicate key: (ddae859b-443d-4dcc-9ded-2d9165668c10|Lucy)

Solution icon of github
duplicate key: (4f581d9e-f221-42d9-a25c-81359e44d8fb|[PR_FAKE])

Stack trace

com.google.gson.JsonSyntaxException: duplicate key: UNRECOGNIZED
	at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:191)
	at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:146)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
	at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:81)
	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60)
	at com.google.gson.Gson.fromJson(Gson.java:755)
	at org.jclouds.http.functions.ParseFirstJsonValueNamed.apply(ParseFirstJsonValueNamed.java:81)
	at org.jclouds.http.functions.ParseFirstJsonValueNamed.apply(ParseFirstJsonValueNamed.java:48)
	at com.google.common.util.concurrent.Futures$3.apply(Futures.java:380)
	at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:522)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Once, 3 months ago
Once, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 9 months ago
4 times, 10 months ago
5 times, 11 months ago
14 more bugmates