Companion

Functions

Link copied to clipboard

Reads the file at path. Throws if it cannot be read, as in browsers, which have no file system; use fromString there.

Link copied to clipboard
fun fromResource(path: String, optional: Boolean = false): JsonSource

Reads a bundled file (see readResourceText for each platform); optional allows it to be missing.

Link copied to clipboard
fun fromString(content: String, origin: String? = null): JsonSource