-
in json we can write like this: [
"arrayItem1",
"arrayItem2"
] It is a valid json file that contains only one array. Is there a way to do this in toml like json, exporting a single array? |
Beta Was this translation helpful? Give feedback.
Answered by
jakedane
Apr 26, 2023
Replies: 1 comment
-
No, you must write it as a key/value pair. The key can not be omitted. The specification says it's valid to have an empty (quoted) key, but it is discouraged. So this would be valid but discouraged: "" = [
"arrayItem1",
"arrayItem2"
] And it doesn't get you what you want because in json this would translate to:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
cangSDARM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No, you must write it as a key/value pair. The key can not be omitted.
The specification says it's valid to have an empty (quoted) key, but it is discouraged. So this would be valid but discouraged:
And it doesn't get you what you want because in json this would translate to: