Tamaya HJSON (Extension Module)

Tamaya HJSON is an extension module. Refer also to the extensions documentation for further details.

What functionality does this module provide?

Tamaya HJSON provides support for reading configuration in HJSON, a JSP similar format better suited for humans:

  a : A
  b : {
    o : O
    p : P
  c : C

Hereby the hierarchical structure of the JSON document will be mapped to a corresponding PropertyValue tree structure. This structure can be mapped to flat key-value pairs of type String, e.g. the above will be mapped to


This extension implements the SPI defined by the tamaya.formats extension module.


The module is based on Java 8.


To use the HJSON extension module you only must add the corresponding dependency to your project:


This extension also transitively requires the tamaya.formats module.

Reading configuration in HJSON

For reading HJSON based configuration most easily a HJSONFormat can be used:

ConfigurationData dataRead = ConfigurationFormats.getInstance().readConfig(
    getClassLoader().getResource("myFileConfig.json"), new HJSONFormat()));

Or, if you are fine with the default mapping you can directly create a PropertySource using the formats API (this works since this module registers the json format automatically using the ServiceContext):

PropertySource ps = ConfigurationFormats.getInstance().createPropertySource(