Kotlin readme example throws error: more elaborated code example for beginners needed? #1695
Unanswered
RequestPrivacy
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, I'm trying to learn moshi by going through the readme. Trying one of the first kotlin example throws me an error though:
I read the notice
and building
moshi
like explained at the end of the readme works:My question is if the line
val moshi: Moshi = Moshi.Builder().build()
in the kotlin examples is meant in a more generic term (reflection vs. codegen) and because of this it's missing e.g. the the needed.addLast(KotlinJsonAdapterFactory())
part for reflective serialization?If so, for me as a beginner just trying to follow the example a comment in the example code (and maybe a link down to the Kotlin section of the page) would be appreciated, e.g.
-> Readme.md
Kotlin
Otherwise one (or better I) was of the opinion the code was already a fully working solution...
Beta Was this translation helpful? Give feedback.
All reactions