You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a legacy config in TOML that I need to load using Fiber and I don't want to shadow a whole TOML serde just for a single mod. I saw some discussion about more serializers in #34, but Configurate doesn't support TOML.
I'm ready work on a PR for this change.
The text was updated successfully, but these errors were encountered:
Correctly supporting the toml format and being fully spec-compliant is fairly tricky, and there are good few representation decisions that have to be made to map an arbitrary tree to TOML output. That's why Configurate has not gotten a TOML loader yet, and one of several reasons why I suspect something like fiber would be reluctant to accept a TOML PR.
You also won't get a functional and spec-compliant toml serializer that's much smaller than any of the existing solutions -- so I'd imagine your time would be better spent by just reusing an existing library.
As of mid-2018 the TOML spec (>= v0.5.0) supports "dotted keys", and it's always supported "tables" (which can be nested). The only thing that can't really be represented is a non-branching root node, e.g. a primitive as the whole config.
I'll play around with an implementation some and wrap it into a PR, and I can always split it into another library if the PR is rejected.
Edit:
Found an old issue about this same thing: mwanji/toml4j#17
I also found that there aren't any good TOML serde libraries. TomlJ looks nice and it modern, but doesn't support serialization: tomlj/tomlj#16
I'll probably just convert my simple TOML to JSON and use Jankson going forward.
I have a legacy config in TOML that I need to load using Fiber and I don't want to shadow a whole TOML serde just for a single mod. I saw some discussion about more serializers in #34, but Configurate doesn't support TOML.
I'm ready work on a PR for this change.
The text was updated successfully, but these errors were encountered: