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

Marshal custom config types as JSON #1030

Merged
merged 7 commits into from
Sep 14, 2022
Merged

Marshal custom config types as JSON #1030

merged 7 commits into from
Sep 14, 2022

Conversation

markphelps
Copy link
Collaborator

Builds off of #1027, will rebase once thats merged

Implements MarshalJSON for config types (uint8)

Before

{
  "log": {
    "level": "DEBUG",
    "encoding": 1
  },
...
  "cache": {
    "enabled": false,
    "ttl": 60000000000,
    "backend": 1,
    "memory": {
      "evictionInterval": 300000000000
    },
}

After

{
  "log": {
    "level": "DEBUG",
    "encoding": "console"
  },
 ...
  "cache": {
    "enabled": false,
    "ttl": 60000000000,
    "backend": "memory",
    "memory": {
      "evictionInterval": 300000000000
    },
}

Base automatically changed from json-log to main September 14, 2022 13:33
@markphelps markphelps marked this pull request as ready for review September 14, 2022 14:21
@markphelps markphelps merged commit 4e1cd36 into main Sep 14, 2022
@markphelps markphelps deleted the json-encode-config branch September 14, 2022 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant