com.github.mmauro94.mkvtoolnix_wrapper.json.Utils.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mkvtoolnix-wrapper Show documentation
Show all versions of mkvtoolnix-wrapper Show documentation
An easy to use light kotlin-jvm wrapper for most common mkvmerge and mkvpropedit CLI commands
The newest version!
package com.github.mmauro94.mkvtoolnix_wrapper.json
import com.beust.klaxon.JsonValue
import com.beust.klaxon.Klaxon
internal fun klaxon() = Klaxon()
.converter(ZonedDateTimeConverter)
.converter(InstantConverter)
.converter(DurationConverter)
.converter(FileConverter)
.converter(DimensionConverter)
.converter(MkvToolnixLanguageConverter)
.fieldConverter(KlaxonBigInteger::class, BigIntegerConverter)
internal fun JsonValue.long() : Long? = int?.toLong() ?: longValue