Skip to content

Instantly share code, notes, and snippets.

View ToniNgethe's full-sized avatar

Toni Ng'ethe ToniNgethe

View GitHub Profile
@ToniNgethe
ToniNgethe / Database.kt
Last active December 28, 2022 06:27
A simple key-value plain database for your demo kotlin based projects. Uses .json file for storing the data
data class DataBaseVersion(
val version: String,
val dataModified: String
)
interface JsonParser {
fun <T> parseToString(data: T): String
fun <T> parseToObject(string: String, type: Type): T
fun <T> parseToObject(string: String, classOfT: Class<T>): T
}