ConfigParser

io.github.matejcerny.sbtconfig.parser.ConfigParser
object ConfigParser

Parser for HOCON configuration files. Converts Typesafe Config to the BuildConfig model.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def parse(file: File): Either[String, BuildConfig]

Parse a HOCON config file into BuildConfig.

Parse a HOCON config file into BuildConfig.

Value parameters

file

The config file to parse

Attributes

Returns

Either an error message or the parsed BuildConfig

def parse(content: String): Either[String, BuildConfig]

Parse a HOCON config string into BuildConfig.

Parse a HOCON config string into BuildConfig.

Top-level fields are parsed as the shared config; an optional modules { … } object maps each module key to its own per-module config (parsed with the same logic). Errors from the shared parse and every module parse are collected into one "; "-joined message.

Value parameters

content

The HOCON config string to parse

Attributes

Returns

Either an error message or the parsed BuildConfig