Skip to content

Commit

Permalink
feat(backend/tests): Add Gson extension utility
Browse files Browse the repository at this point in the history
  • Loading branch information
Grohden committed Aug 2, 2020
1 parent b2dfbb5 commit f0b78dc
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.grohden.repotagger.extensions

import com.google.gson.Gson
import com.google.gson.reflect.TypeToken


inline fun <reified T> Gson.fromJson(json: String) =
fromJson<T>(json, object : TypeToken<T>() {}.type)

0 comments on commit f0b78dc

Please sign in to comment.