jacob
02/21/2018, 9:43 AMinline fun <T>safeJsonParse(input: String, l: KSerialLoader<T>): Either<RuntimeException, T> {
try {
return Either.Right(JSON.Companion.parse(l, input))
} catch (e: Exception) {
return Either.Left(RuntimeException("Something went wrong"))
}
}