RESPONSE <http://10.0.2.2:8080/cocktailIngredientMatrix> failed with exception: kotlinx.serialization.json.JsonDecodingException: Invalid JSON at 23: Encountered an unknown key cocktailID
RESPONSE <http://10.0.2.2:8080/ingredients> failed with exception: kotlinx.serialization.json.JsonDecodingException: Invalid JSON at 41: Encountered an unknown key name
e
e5l
11/08/2019, 11:02 AM
Hi @martin.petrulak, could you check the content of json?
m
martin.petrulak
11/08/2019, 11:07 AM
Hey sure, i mean , code works if i have registered only one resializer.
So if i call
/ingredients
and only
Ingredient
serializer is registered code works.
Same goes for
/cocktailIngredientMatrix
, it works ,if i have registered only
CocktailIngredientMatrix
serializer.
In scenario when i want to hit both enpoints -> i need both serializers to be registered, one of them throw an exception.
Wierd thing is that when i change the order of how i register the serializer, the one that did not worked works, and the one that worked doesnt work
e
e5l
11/08/2019, 11:08 AM
Yep, it looks like an issue. We deprecated
registerSerializer
because of
typeOf
m
martin.petrulak
11/08/2019, 11:10 AM
what woudl be the correct way of doing it ?
martin.petrulak
11/08/2019, 2:36 PM
@e5l so for the time being, i am just creating multiple instances of
HttpClient
, is there any issu tracker ticket that i can follow?