title: Convert GsonBuilder into Kotlin
body: <p>Does anyone know how to convert this code into kotlin</p>
  
  <pre><code>GsonBuilder builder = new GsonBuilder();
  builder.setLenient();
  builder.registerTypeAdapter(Date.class, new JsonDeserializer&lt;Date&gt;() {
          @Override
          public Date deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
              if (json.getAsJsonPrimitive().isNumber()) {
                  return new Date(json.getAsJsonPrimitive().getAsLong() * 1000);
              } else {
                  return null;
              }
          }
      });
  return builder.create();
  </code></pre>
  
  <p>Then, i tried</p>
  
  <pre><code>val builder = GsonBuilder()
  builder.setLenient()
  builder.registerTypeAdapter(Date::class.java,.........)
  return builder.create()
  </code></pre>
  
  <p>..... i can't figured it out how to convert the code</p>