com.github.erosb.jsonsKema.Uri.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of json-sKema Show documentation
Show all versions of json-sKema Show documentation
JSON Schema Parser and Validator
package com.github.erosb.jsonsKema
import java.net.URI
internal fun parseUri(raw: String): Uri {
val rawUri = URI(raw)
val poundIdx = raw.indexOf('#')
return if (poundIdx == -1) {
Uri(rawUri, "")
} else {
Uri(URI(raw.substring(0, poundIdx)), raw.substring(poundIdx))
}
}
internal data class Uri(val toBeQueried: URI, val fragment: String) {
override fun toString() = toBeQueried.toString() + fragment
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy