-
Notifications
You must be signed in to change notification settings - Fork 125
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
kcl run --format toml
returns wrong data
#1792
Comments
This is the order defined by schema attr. If you want to achieve what you want, just change the order of a and b.
I will temporarily close this issue. If you have any questions, please reopen it again. |
The order of the KCL schema def should not matter here, but the order in the TOML matters, since at the moment (with this bug) a TOML like [b]
a = "a" is the follwoing JSON {
"b": {
"a": "a"
}
} while a TOML like a = "a"
[b] is the following JSON {
"a": "a",
"b": {}
} ...so this issue is not fixed by just changing the order of KCL attributes, this would be unmaintainable if you consider subclassing and it would put the burden of sane serialization to the writer of KCL code. |
@He1pa see https://toml.io/en/v1.0.0#table
|
ok, i got you, I will fix it |
Bug Report
Using the
--format toml
option to render TOML instead of YAML returns a wrong result.Seems like there is a custom/naive toml serializer in place...
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your KCL components version? (Required)
kcl version is v0.10.8
The text was updated successfully, but these errors were encountered: