Skip to content

Allow serializing numbers as hex, octal, or binary for readability #44

@levicki

Description

@levicki

Is your feature request related to a problem? Please describe.
Currently it does not seem possible to control serialization of numbers in the library. TOML specification allows numbers to be specified with 0x, 0o, and 0b prefixes. This is a great advantage over other file formats because it allows for serialization of things like hex RGBA color values, Unix permissions, and bitfields/flags in a human-readable format.

Describe the solution you'd like
Implement some way of specifying the number format for insert() and insert_or_assign() methods.

Describe alternatives you've considered
I am not aware of any alternatives.

Additional context
N/A

Metadata

Metadata

Assignees

Labels

featureNew feature or enhancement requestimplemented in v3Fixes + features which were implemented in v3 release.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions