(config->map config)
Converts an instance of Config
to a more user-friendly clojure map
Converts an instance of `Config` to a more user-friendly clojure map
(config-file->map file-path)
Given the path to a configuration file (of type .conf, .json, or .properties), parse the file and return a clojure map representation of the data. Returns empty map for non-existing file.
Given the path to a configuration file (of type .conf, .json, or .properties), parse the file and return a clojure map representation of the data. Returns empty map for non-existing file.
(java-config->clj v)
Given a java configuration object read from a config file, convert it to a clojure object suitable for use in our internal configuration representation.
Given a java configuration object read from a config file, convert it to a clojure object suitable for use in our internal configuration representation.
(java-list->vec l)
Given a java List object read from a config file, convert it to a clojure vector for use in our internal configuration representation.
Given a java List object read from a config file, convert it to a clojure vector for use in our internal configuration representation.
(map->string m)
Serialize the clojure data structure m
to string using the
typesafe config format. m
is typically the result of a
config-file->map
or reader-map
with some modifications.
Serialize the clojure data structure `m` to string using the typesafe config format. `m` is typically the result of a `config-file->map` or `reader-map` with some modifications.
(nested-java-map->map m)
Given a (potentially nested) java Map object read from a config file, convert it (potentially recursively) to a clojure map with keywordized keys.
Given a (potentially nested) java Map object read from a config file, convert it (potentially recursively) to a clojure map with keywordized keys.
(reader->map input)
(reader->map input format)
Given any clojure object that is suitable for use with reader
, parse the
configuration data and return a clojure map representation of the data.
Optional format
arg may be one of :conf
, :json
, or :properties
, to
specify the configuration format. Defaults to :conf
.
Given any clojure object that is suitable for use with `reader`, parse the configuration data and return a clojure map representation of the data. Optional `format` arg may be one of `:conf`, `:json`, or `:properties`, to specify the configuration format. Defaults to `:conf`.
(string->val s)
Given a string read from a config file, convert it to the corresponding value that we will use for our internal configuration data. This includes removing surrounding double-quotes and casting to an integer when possible.
Given a string read from a config file, convert it to the corresponding value that we will use for our internal configuration data. This includes removing surrounding double-quotes and casting to an integer when possible.
(strip-quotes s)
Given a string read from a config file, check to see if it begins and ends with double-quotes, and if so, remove them.
Given a string read from a config file, check to see if it begins and ends with double-quotes, and if so, remove them.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close