mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2521] Configuration: use YAML/JSON instead of INI #1999
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#1999
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fatedier on GitHub (Aug 8, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2521
In the early stage of development, I choose INI as configure format because it looks simple and easy to write.
However, with the increase of project complexity, INI can't describe complex configures. It doesn't support hierarchical configuration. We use same prefix to represent arrays or maps. It's not an elegant way and difficult to unmarshal to a struct.
We want to use YAML and JSON to replace INI in a smooth way:
@fakeboboliu commented on GitHub (Aug 10, 2021):
maybe TOML?
JSON is hard to write by a human since its commas and quotes. And YAML needs lots of spaces for indenting, which causes hard to read.
TOML will be more flexible:
@fatedier commented on GitHub (Aug 12, 2021):
TOML maybe not suitable for multiple levels configurations. It's redundant.
We will support JSON and YAML first, it's widely used and easy to auto generate. And then, other format can also be supported if it can simple map file content to a golang struct.
@cloudwindy commented on GitHub (May 2, 2023):
Is this planned in v1.0?
@fatedier commented on GitHub (May 4, 2023):
@cloudwindy For compatibility reasons, this issue has been temporarily shelved. In the next major version, it will be directly supported, not v1, but v2.