title: Issues to pass objects as parameters from activity to fragment
body: <p>I am trying to pass an object as a parameter from an activity to a fragment.</p>
  
  <p>I already searched over hill and dale to find out how to do it, I tried many methods but none of them worked.</p>
  
  <p>Here is what I tried :</p>
  
  <pre><code>// In my Activity, where I call my fragment
  var bundle = Bundle()
  bundle.putParcelable("restaurant", restaurant)
  var fragment = Home2Fragment()
  fragment.arguments = bundle
  supportFragmentManager.beginTransaction().replace(R.id.content, fragment, FRAGMENT_HOME).commit()
  </code></pre>
  
  <p>My IDE (Android Studio) underline "restaurant" in bundle.putParcelable line, telling me a type mismatch.
  This is the same with the getArguments() methods, I get a type mismatch.</p>
  
  <p>My class look like this :</p>
  
  <pre><code>@Parcel
  class Establishment {
  
      var title = ""
      // More variables
  
      fun loadFromJson(json: JsonObject) {
          title = readString(json, TAG_TITLE)
          // More API loads
      }
  
      companion object {
          private const val TAG_TITLE = "title"
          // More tags
      }
  }
  </code></pre>
  
  <p>I don't understand why my class is set as "Parcel" but is not recognized as a "Parcelable".</p>
  
  <p>I am looking for an efficient way to pass parameters from an activity to a fragment.</p>
  
  <p>Thanks a lot in advance.</p>
  
  <hr>
  
  <p>EDIT :</p>
  
  <p>As asked, I tried to make it as Serializable.
  I can't make it Serializable, as "Serializable" does not exists.</p>
  
  <p>But I tried to make it "SerializedName", but "This annotation is not applicable to target 'class' "</p>