Skip to content

Fix and Allow Number and Boolean type to be key in from yaml - #7607

Merged
stormasm merged 3 commits into
nushell:mainfrom
amirHdev:from-yaml
Dec 27, 2022
Merged

stormasm merged 3 commits into
nushell:mainfrom
amirHdev:from-yaml

Conversation

@amirHdev

@amirHdev amirHdev commented Dec 26, 2022 •

Copy link
Copy Markdown
Contributor

Fix and Allow Number and Boolean type to be key in Yaml .

For example :
"200 : " | from yaml not allowed because of Number key type.

PR allow , we can use Boolean and Number for key.
For example :
"true : false" | from yaml
"5050 : it is number" | from yaml

Fixes #7222 .

@amirHdev amirHdev changed the title Fix and Allow Number and Boolean type to be key in Yaml Fix and Allow Number and Boolean type to be key in from yaml Dec 26, 2022
@stormasm

Copy link
Copy Markdown
Contributor

@Mehrbod2002 this looks good would you mind adding some tests as well... thank you !

@amirHdev

amirHdev commented Dec 27, 2022 •

Copy link
Copy Markdown
Contributor Author

@Mehrbod2002 this looks good would you mind adding some tests as well... thank you !

Done .
Thanks @stormasm

@stormasm

Copy link
Copy Markdown
Contributor

@Mehrbod2002 thanks ! the tests look great... good job on this PR it will certainly add to our yaml experience...

@stormasm
stormasm merged commit 5689273 into nushell:main Dec 27, 2022
@amirHdev
amirHdev deleted the from-yaml branch December 29, 2022 14:53
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.

Error when opening yaml with number as key

2 participants