title: Save ArrayList values in Room one by one - Android
body: <p>I am saving data with <code>Room</code> of <code>architect component</code> in my app and I am using from converter but it save like bellow:</p>
  
  <p><a href="https://i.stack.imgur.com/rP7Sw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rP7Sw.png" alt="enter image description here"></a></p>
  
  <p>But I need to save values of list one by one in sqlite but save an array.</p>
  
  <p>My entities is <a href="https://stackoverflow.com/questions/56020030/relation-on-entities-android">HERE</a>.</p>
  
  <p>And I using bellow converter:</p>
  
  <pre><code>public class ContentConverter {
      private Gson gson = new Gson();
  
      @TypeConverter
      public List&lt;Content&gt; stringToSomeObjectList(String data) {
          if (data == null) {
              return Collections.emptyList();
          }
  
          Type listType = new TypeToken&lt;List&lt;Content&gt;&gt;() {
          }.getType();
  
          return gson.fromJson(data, listType);
      }
  
      @TypeConverter
      public String someObjectListToString(List&lt;Content&gt; someObjects) {
          return gson.toJson(someObjects);
      }
  }
  </code></pre>