Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Mustache: Serializer for class 'MustacheContent' is not found

I’m trying to do a project using Ktor and Mustache (amongst other things). However, when I tried templating with Mustache, following this tutorial, I get the following error:

500: kotlinx.serialization.SerializationException: Serializer for class 'MustacheContent' is not found.
Mark the class as @Serializable or provide the serializer explicitly.

Of course, I can’t change the MustacheContent class for it to be Serializable, since it’s part of the Mustache package. Any idea as to what might fix this ?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

This is a known bug. The fix will be delivered in the Ktor 2.3.0 release. As a workaround, you can place an installation of the ContentNegotiation plugin after an installation of the Mustache plugin.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading