oωo (owo-lib)

oωo (owo-lib)

46M Downloads

Support for file comments

Kesuaheli opened this issue · 2 comments

commented

Since the lib already uses .json5 for the files, it would also fit to include comments in the serialized config. See specification for reference.

I would suggest it would fit to add an @Comment-annotation to a field, e.g.

public String noComment = "sad";

@Comment("Look at me, I'm actually describing this option")
public String yesComment = "happy";

would result in this file

{
	"noComment": "sad",
	// Look at me, I'm actually describing this option
	"yesComment": "happy"
}
commented

@Kesuaheli We use Jankson to handle reading and writing for config files and the current implementation should allow for @Comment to work for fields on the config model.

commented

Oh I didn't realize it. I search for something from io.wispforest.owo.config.annotation.
Thats awesome then!