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

Parse error #4

Closed
raine opened this issue May 28, 2015 · 6 comments
Closed

Parse error #4

raine opened this issue May 28, 2015 · 6 comments

Comments

@raine
Copy link

raine commented May 28, 2015

https://github.com/toml-lang/toml#example

Near line 7 (last key parsed 'owner.dob'): Expected 'Z' in ISO8601 datetime, but found '-' instead.
# This is a TOML document.

title = "TOML Example"

[owner]
name = "Tom Preston-Werner"
dob = 1979-05-27T07:32:00-08:00 # First class dates

[database]
server = "192.168.1.1"
ports = [ 8001, 8001, 8002 ]
connection_max = 5000
enabled = true

[servers]

  # Indentation (tabs and/or spaces) is allowed but not required
  [servers.alpha]
  ip = "10.0.0.1"
  dc = "eqdc10"

  [servers.beta]
  ip = "10.0.0.2"
  dc = "eqdc10"

[clients]
data = [ ["gamma", "delta"], [1, 2] ]

# Line breaks are OK when inside arrays
hosts = [
  "alpha",
  "omega"
]
@dbohdan
Copy link
Member

dbohdan commented May 28, 2015

At this point Remarshal only supports TOML v0.2.0, which requires that the "Z" be there in the date. This is due to the TOML library on which Remarshal relies implementing that version of the format.

I will keep this issue open until the library is updated to support TOML v0.4.0 or until I find a suitable replacement (one that supports reflection).

@raine
Copy link
Author

raine commented May 28, 2015

Thanks!

@dbohdan dbohdan added the toml label May 28, 2015
@jmelfi
Copy link

jmelfi commented Oct 2, 2015

This might not be the best place for this, but I'm wondering since the Burntsushi/toml library hasn't moved forward in a while what the problem would be to converting this to use the naoina/toml library. I'm trying to get it worked in but I'm not the best Go programmer.

Would this be a desired change or is the desire to continue using the burntsushi library?

@dbohdan
Copy link
Member

dbohdan commented Oct 5, 2015

If naoina/toml can unmarshal arbitrary data (i.e., not just predefined structs) like BurntSushi/toml can then I have no objections to replacing BurntSushi/toml with it. I will gladly accept your pull request if you do and it passes the tests in tests.sh.

That said, from looking at the documentation it seems to me that naoina/toml only works with predefined structs.

@jmelfi
Copy link

jmelfi commented Oct 5, 2015

@dbohdan I believe this is true. This leads me to probably go down the avenue of trying to see what is required to resolve the issue in BurntSushi/toml.

If I get it working in either, I'll update here.

Thanks

dbohdan added a commit that referenced this issue Sep 2, 2016
Python's libraries for TOML and YAML solve the problem of
Remarshal not being able to process TOML newer than version 0.2 (#4)
and at least some of the issues with the generated YAML (#2, #5).
Floating point precision (#2) in all formats requires further
investigation, though it seems that what PyYAML and pytoml do
matches the respective specs.

v0.4.0
@dbohdan
Copy link
Member

dbohdan commented Sep 2, 2016

remarshal has been rewritten in Python. The newest version supports TOML 0.4.

@dbohdan dbohdan closed this as completed Sep 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants