Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

407
Views
Moshi: When is Reflection needed?

Currently using Moshi with Retrofit but need to look back as I noticed I am not implementing it right and confused when to add kotlin-reflect in the dependencies.

According to README

The reflection adapter requires the following additional dependency:

implementation("com.squareup.moshi:moshi-kotlin:1.13.0")

I thought the above dependency is the actual Moshi dependency but it seems it is not needed unless you are using KotlinJsonAdapterFactory. What is KotlinJsonAdapterFactory anyway, is it responsible for converting Kotlin classes to JSON?

Currently I have this dependencies and annotation processor.

   implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

    // Retrofit 2 + Moshi
    ksp 'com.squareup.moshi:moshi-kotlin-codegen:1.12.0'
    implementation 'com.squareup.moshi:moshi-kotlin:1.12.0'
    implementation 'com.squareup.retrofit2:converter-moshi:2.9.0'

If I will be using Moshi with Codegen only, can I remove the others and ended up on just these two dependency?

    ksp 'com.squareup.moshi:moshi-kotlin-codegen:1.12.0'
    implementation 'com.squareup.retrofit2:converter-moshi:2.9.0'
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!