- Kotlin Standard Library Cookbook
- Samuel Urbanowicz
- 41字
- 2021-07-23 19:05:59
How to do it...
- Create a new file where we will put an extension function implementation (for example, GsonExtensions.kt)
- Inside the file, declare an extension function for the Gson class:
inline fun <reified T> Gson.fromJson(json: String): T {
return fromJson(json, T::class.java)
}
推薦閱讀
- iOS Game Programming Cookbook
- Vue.js快速入門與深入實戰(zhàn)
- Java從入門到精通(第4版)
- JSP開發(fā)案例教程
- 編程與類型系統(tǒng)
- 微信小程序全棧開發(fā)技術與實戰(zhàn)(微課版)
- Python+Tableau數(shù)據(jù)可視化之美
- 從Excel到Python數(shù)據(jù)分析:Pandas、xlwings、openpyxl、Matplotlib的交互與應用
- Python商務數(shù)據(jù)分析(微課版)
- C++程序設計教程
- Java程序設計基礎(第6版)
- Software Development on the SAP HANA Platform
- SFML Game Development
- Arduino Electronics Blueprints
- Bitcoin Essentials