title: How to save List<Double> to Room database?
body: <p>I'm trying to save a List of Double to Room database using this Converter class:</p>
  <pre><code>public class Converters {
  
      @TypeConverter
      public static String fromDoubleList(List&lt;Double&gt; doubleList){
  
          Gson gson = new Gson();
          String json = gson.toJson(doubleList);
          return json;
      }
  
      public static List&lt;Double&gt; fromString(String value){
  
          Type listType = new TypeToken&lt;List&lt;Double&gt;&gt;(){}.getType();
          return new Gson().fromJson(value, listType);
      }
  }
  </code></pre>
  <p>but I keep getting this message:</p>
  <pre><code>error: Cannot figure out how to save this field into database. You can consider adding a type converter for it.
  </code></pre>
  <p>Why isn't the converter class working?</p>
  <p>Edit - This is my database:</p>
  <pre><code>@Database(entities = {MarketUnit.class}, version = 1)
  @TypeConverters({Converters.class})
  public abstract class MarketDatabase extends RoomDatabase {
  
      public static final String DATABASE_NAME = &quot;market_db&quot;;
  
      private static MarketDatabase instance;
  
      public static MarketDatabase getInstance(final Context context){
          if(instance == null){
              instance = Room.databaseBuilder(
                      context.getApplicationContext(),
                      MarketDatabase.class,
                      DATABASE_NAME
              ).build();
          }
          return instance;
      }
  
      public abstract MarketDao getMarketDao();
  
  }
  </code></pre>
  <p>I've tried the suggestion from the duplicate question, but it's not working!</p>