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

"unexpected token" when dotted key isn't quotted #2

Open
salim-b opened this issue Jan 16, 2020 · 3 comments
Open

"unexpected token" when dotted key isn't quotted #2

salim-b opened this issue Jan 16, 2020 · 3 comments

Comments

@salim-b
Copy link

salim-b commented Jan 16, 2020

STOML has obviously issues with dotted keys when they are not quoted.

The following TOML snippet

la.la = "bla"

throws the error

While parsing config: (1, 1): unexpected token

when parsed using STOML, while the same key in quoted form

"la.la" = "bla"

or in table notation

[la]
la = "bla"

is parsed fine by STOML.

Would be awesome if you could fix this :)

@greg-szabo
Copy link
Contributor

I'll see what I can do about this.
Just got around to release a new version with slightly newer dependent libraries.

@greg-szabo
Copy link
Contributor

This seems to be the shortcoming of the underlying viper library and based on other issues I have open with them (and the immediate note about viper v2) I have a feeling it's not worth to pursue it there, they're essentially sunsetting v1. Still, I opened a new issue with them, let's see if we get a response.

My long-term goal is to merge the stoml and sconfig projects into one, possibly using a different TOML-parsing library. I think that's going to be the real resolution to this problem.

@salim-b
Copy link
Author

salim-b commented May 28, 2021

My long-term goal is to merge the stoml and sconfig projects into one, possibly using a different TOML-parsing library. I think that's going to be the real resolution to this problem.

Ok, cool! Maybe the go-toml library could be a good choice?

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

No branches or pull requests

2 participants