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

exception occurred #6

Closed
eiryu opened this issue Feb 7, 2015 · 4 comments
Closed

exception occurred #6

eiryu opened this issue Feb 7, 2015 · 4 comments

Comments

@eiryu
Copy link

eiryu commented Feb 7, 2015

println JToml.parseString('dob=1979-05-27T07:32:00-08:00').getDate('dob')
Caught: io.ous.jtoml.ParseException: Extra characters at -05-27T07:32:00-08:00
io.ous.jtoml.ParseException: Extra characters at -05-27T07:32:00-08:00
    at io.ous.jtoml.impl.Parser.onAssignment(Parser.java:99)
    at io.ous.jtoml.impl.Parser.onLine(Parser.java:61)
    at io.ous.jtoml.impl.Parser.parse(Parser.java:43)
    at io.ous.jtoml.JToml.parse(JToml.java:33)
    at io.ous.jtoml.JToml.parseString(JToml.java:26)
    at io.ous.jtoml.JToml$parseString.call(Unknown Source)
    at jtoml2.run(app.groovy:18)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
@asafh
Copy link
Owner

asafh commented Feb 15, 2015

Hi eiryu,
The implementation isn't up to date with TOML v0.3.0, which allows additional time formats.
For now you can either use the ISO 8601 full zulu form "1979-05-27T07:32:00Z" (i.e. without offset).
I will try to get the implementation up to date with the most recent - v0.4.0, possibly this week but I can't promise anything.

Cheers,
Asaf

@asafh
Copy link
Owner

asafh commented Mar 4, 2015

Hi @eiryu, to catch up with the changes between TOML v0.1.0 to v0.4.0 I will rewrite the parsing of TOML. While at it I will also make a few breaking changes:

  • Naming of classes (namely KeyGroup => TomlTable)
  • Behaviors on KeyGroup (now TomlTable):
    • toMap - will now behave like localsAsMap, and 'localsAsMap' will be removed.
    • getX - Going doing multiple levels is no longer done with one concatenated string, but each an argument alone. e.g. toml.getBoolean("foo.bar.z") => toml.getBoolean("foo","bar","z") - This is more similar to how you'd use a JSON and is mostly to support non-bare-key names that can now contain "." within them.
    • getAsEnum will also move the enum class parameter to the first position. e.g. getAsEnum("foo.stringKey", TestEnum.class) => getAsEnum(TestEnum.class, "foo","stringKey")
    • getLocalX - all removed.
    • getKeyGroup => getTomlTable

You can look at the work here, it already works vs the v0.1.0 unit tests, but I need to create unit tests for v0.4.0 and make the code work with them.

@asafh
Copy link
Owner

asafh commented Jan 14, 2017

Fixed in #7, please use version 2.0.0 deployed to Maven.

@asafh asafh closed this as completed Jan 14, 2017
@eiryu
Copy link
Author

eiryu commented Jan 14, 2017

@asafh Thanks!!!!

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