parseAll

Given a definition in JSON format, it parses it and parses it

See also

(com.google.gson.JsonElement)

Parameters

definition

a JSON string representation of the definition

fun parseAll(definition: String): Either<ParseError, List<Experiment>>

Given a JSON definition, it attempts to parse it into a list of experiments

The definition should be a JSON object with at least one experiment definition. The error reporting halts on the first encountered error. It does not report a list of errors.

Return

Either a parse error if something did not match koncierge's format or the list of Experiment

Parameters

definition

a JsonElement representation of the definition

fun parseAll(definition: JsonElement): Either<ParseError, List<Experiment>>