Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toml serializer #59

Open
A248 opened this issue Aug 29, 2023 · 1 comment
Open

Toml serializer #59

A248 opened this issue Aug 29, 2023 · 1 comment
Labels
enhancement New feature or request feature request help wanted Extra attention is needed

Comments

@A248
Copy link
Contributor

A248 commented Aug 29, 2023

I have a dependent configuration library which supports multiple configuration formats depending on the caller's choice. Toml has been requested a few times, but I still need the ability to write comments on the toml values at serialization time. Unfortunately, TomlTable#entrySet does not use any kind of "node" type, which makes it harder to provide additional metadata to toml values.

In the original issue for toml serialization, #16, it was suggested to add a type hierarchy for toml values to enable us to write toml effectively. Such a suggestion could be worked into a version 2 of this library. Comments could be attached to the objects mentioned:

Exposing something similar to Jackson/Gson/Hjson/Jankson's type hierarchy (JsonElement, JsonObject, JsonPrimitive) would be great too.

@cleishm cleishm changed the title Toml serializer improvements including writing comments with it Toml serializer Dec 31, 2023
@cleishm
Copy link
Contributor

cleishm commented Dec 31, 2023

We'll use this issue for all things related to getting a complete Toml Serializer implementation.

While toToml() methods were added in #49, this is limited to re-serializing a previously parsed document. For a complete implementation, I suspect we'd want the following:

  • APIs for constructing a Toml document model (e.g. a writable/modifiable version of TomlTable, etc).
  • APIs for adding metadata (e.g. comments) to the document model.

Feel free to suggest anything else.

@cleishm cleishm added enhancement New feature or request help wanted Extra attention is needed feature request labels Dec 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants