night-config

Powerful java configuration library for toml, yaml, hocon, json and in-memory configurations. Serialization/deserialization framework.

LGPL-3.0 License

Stars
234
Committers
10

Bot releases are hidden (Show)

night-config - NightConfig v3.4.0 - nicer with primitives

Published by TheElectronWill about 6 years ago

In almost all cases, this release is backward-compatible with previous 3.x.x code. However, there are some changes related to the conversion of null values and Scala methods. They could, in very specific cases, force you to modify your code.

New

  • Primitive getters getInt, getLong, etc. in UnmodifiableConfig and UnmodifiableConfig.Entry
  • Optional getters in UnmodifiableConfig.Entry
  • Better handling of null values stored as NULL_OBJECT with the methods getRaw(path) and isNull(path)
  • The conversion function of ConversionTable now receives NULL_OBJECT instead of null if the value exist but "is null".

Fixed

  • Issue #43: FileConfig.autosave() works again
  • Issue #44: NightConfig is now available on Maven Central
  • Issue #45: you can now get a long from an Integer value or vice-versa

Removed

  • $minus$eq and $plus$eq methods which couldn't be called nicely from Scala
night-config - NightConfig v3.3.0 - support TOML v0.5

Published by TheElectronWill over 6 years ago

  • Fixes multiple bugs like #42
  • Supports TOML v0.5.0
  • Improved error messages
night-config - NightConfig v3.2.0 - support Java NIO Path

Published by TheElectronWill over 6 years ago

New

  • All the operations on File now work on java.nio.file.Path too!
  • New parameter emptyDataAccepted for the JSON parser

Fixes

  • Fix String parsing which was completely broken because FastStringReader was incorrectly implemented
  • When possible, JsonParser now returns an int value instead of a long
  • Fix json parsing of empty objects and empty arrays
  • Fix json parsing of deeply nested structures
night-config - NightConfig v3.1.1 - Json bugfixes

Published by TheElectronWill over 6 years ago

See #39 and #40

night-config - NightConfig v3.1.0 - better, simpler, faster!

Published by TheElectronWill over 6 years ago

Fixes

  • Fix null values unsupported by concurrent configurations. This is done by replacing null by NULL_OBJECT in the config's underlying HashMap. These NULL_OBJECTs aren't visible when getting/setting the configuration's values, but they are visible when using the underlying map.
  • Fix bugs in TOML and YAML parsers
  • Fix thread-safety issue that shows up whan using autoreload and autosave together

Improvements

  • Implement the last TOML updates:
    • Compound (aka "dotted") keys
    • Hexadecimal, octal and binary integers
  • Improve the performance of autoreloaded and autosaved FileConfigs by avoiding useless operations
  • New method: getOrElse which is a getter with a default value, see #34
  • Simplify ConfigFormat and the generics everywhere! Moving from ConfigFormat<C extends D, D extends Config, W extends UnmodifiableConfig> to ConfigFormat<C extends Config>.
  • More unit tests
  • More documentation, and a new wiki!
night-config - NightConfig v3.0.4 - TOML bugfixes

Published by TheElectronWill over 6 years ago

Fixed #31

night-config - NightConfig v3.0.3 - bugfixes and dependencies update

Published by TheElectronWill almost 7 years ago

  • Updated JUnit to 5.0.2 stable
  • Updated TypesafeConfig to 1.3.2 stable
  • Fixed parsing of TOML inline tables
night-config - NightConfig v3.0.2 - more bugfixes

Published by TheElectronWill about 7 years ago

  • Fixed a NullPointerException when building non-concurrent CommentedFileConfigs (non-commented FileConfig were note affected).
night-config - NightConfig v3.0.1 - small but interesting improvements

Published by TheElectronWill about 7 years ago

Changes from version 3.0:

  • Moved scala apply(path) from Config to UnmodifiableConfig - which is what should have been done in v3.0, since the method get is in UnmodifiableConfig.
  • Added scala methods += and -= to ConversionTable
  • New annotation: @SpecValidator, which allows you to define a custom validator class for a field. There is an example of this feature here.
night-config - NightConfig v3.0 stable

Published by TheElectronWill about 7 years ago

Changes from the beta version:

  • Fixed the javadoc so that the gradle build works
  • FileConfig.close() now ensures that the pending writing operations complete
  • ConversionTable now traverses the class hierarchy to find an appropriate conversion function
  • Added convenient methods for Scala in the Config interface: apply calls get, update calls set, and += calls add
  • Added more code examples
night-config - v3.0 Beta - Revolution!

Published by TheElectronWill about 7 years ago

This is a major version with a lot of breaking changes from the previous versions:

  • Frequently used methods are less verbose: for instance config.setValue is replaced by config.set
  • Writers and parsers are more configurable with WritingMode, ParsingMode and FileNotFoundAction.
  • FileConfig is now linked to one specific file, and you can use powerful systems (like autoreloaded config) with the FileConfigBuilder.
  • ConfigFormat are introcuded: they represent a particular format of config file, and are used to write, parse and create configurations.
  • Config instances are obtained via static methods instead of specific constructors.
  • It is now possible to create concurrent thread-safe configurations, via Config.ofConcurrent(...) or ConfigFormat.createConcurrentConfig().
  • And more!

Code examples are available in the directory examples/src/main/java.

Few changes are expected between this beta and the final release: mostly bugfixes and small adjustements.

night-config - 2.1 Bugfix for ConfigSpec

Published by TheElectronWill about 7 years ago

Fix a ConcurrentModificationException that occurs when ConfigSpec.correct(Config) removes a value from the config.

night-config - 2.0 Bugfix for ConfigSpec

Published by TheElectronWill about 7 years ago

Fix a ConcurrentModificationException that occurs when ConfigSpec.correct(Config) removes a value from the config.

night-config - 2.1 Bugfix release

Published by TheElectronWill about 7 years ago

This is a bugfix release for the 2.1 branch. It resolves:

  • the TOML issues #22 , #23 and #24
  • the core issue #25
night-config - 2.0 TOML bugfix release

Published by TheElectronWill about 7 years ago

This is a bugfix release for the 2.0 branch. It resolves the following issues, all related to the toml module:
#21, #22 , #23 and #24

night-config - Move SimpleCommentedConfig to the right package

Published by TheElectronWill over 7 years ago

SimpleCommentedConfig was in the default package. It has been moved to the package "com.electronwill.core".

night-config - Small bugfix release

Published by TheElectronWill over 7 years ago

Fixes issue #21: Exception when a comment is at the end of the file.

night-config - v2.1: Better comment management

Published by TheElectronWill over 7 years ago

  • API not broken between 2.0 and 2.1.
  • Add getComments and setComments which resolves #20
  • Add method clearComments to clear the comments but not the values.
  • Add SimpleCommentedConfig: like SimpleConfig but with comments.
night-config - Version 2: Final Release!

Published by TheElectronWill over 7 years ago

Summary: Night-Config is now much more powerful and also more easy to use!

Changes since the previous big version (stable 1.x):

  • Unmodifiable configurations
  • Commented configurations. TOML and HOCON are the only formats supported.
  • Better, easier conversions between plain objects and configurations
  • Annotations for converting objects to and from configs: Path, AdvancedPath, Conversion, ForceBreakdown, Spec...
  • New way to create a checked config: Config.checked() returns a checked view of the config
  • UnmodifiableConfig.entrySet()
  • CommentedConfig.commentMap()
  • Renamed asMap() to valueMap()
  • Renamed asUnmodifiable() to unmodifiable()
  • Renamed readFrom(File) to parse(File)
  • Renamed writeTo(File) to write(File)
  • Renamed ConfigParser.parseConfig to parse
  • Renamed ConfigWriter.writeConfig to write
  • Optimized TOML parser
  • More configurable parsers and writers, e.g. with IndentStyle and NewlineStyle.
  • Javadoc and Sources jar files can be created, and are available through jitpack

Changes since the last beta version (2.0-beta3):

  • A conversion function can no longer be used with the ObjectConverter
  • Added Config.checked()
  • Added UnmodifiableCommentedConfig.commentMap()
  • Added UnmodifiableCommentedConfig.getOptionalComment(path)
  • More powerful annotations for converting objects to configurations.
  • Bugfixes
night-config - v2, beta 3: Conversion function in ObjectConverter, Javadoc build

Published by TheElectronWill over 7 years ago

  • Method removeComment returns the previous comment
  • You can now use a conversion function when converting a configuration to an object (or vice-versa)
  • The gradle build creates javadoc and sources jar files
  • Code cleanup
Package Rankings
Top 3.2% on Repo1.maven.org
Badges
Extracted from project README
Maven Central javadoc CircleCI