-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Add TOML (https://en.wikipedia.org/wiki/TOML) support #219
Comments
We are always open for contributions, and this seems like it could be quite doable -- maybe even if module supported ini-like formats more generally. I don't think I have time to tackle this myself (nor have personal need) but I would be happy to help anyone who wanted to give it a try. |
Hi, I'm interested in working on it. As I understand this would be creation of the new subproject like already existing for yaml, xml, csv and properties modules and following their pattern. How do you think I could start?
This is something that would probably require dedicated remote branch. Wouldn't it? Can we use any existing open-source library for it or do it from scratch? |
Yes, one option would be to create a sub-project in a fork. Alternatively it could first be a stand-alone project: this might be better at first as these backends do not share anything common in project: it is purely for convenience of releasing versions. As to using something as the base for decoding: if something is found, that can work -- yaml uses snake-yaml and xml stax implementation (Woodstox or Aalto or one bundled in JDK)... and Properties reading uses JDK parser. Then again CSV is written from scratch so that is an option too, depending on how easy (or not) integration is. So long story short: yes, use of another library under the hood is fine and often makes sense. 1-2-3 plan makes sense, that is about how I would start. I have found that it is often easier to start with generation side, actually, than parsing. But that'd be up to you. |
Oh, one important thing that complicates things slightly: Jackson branching wrt 2.x / 3.0.0-SNAPSHOT. |
There was this request for "tom4j": mwanji/toml4j#37 |
Toml4j appears to be dormant. https://github.com/Jezza/toml is more recent and light-weight. Unfortunately none of them support TOML v1.0.0 |
@aalmiray On TOML v1.0.0, do you know biggest differences between earlier versions? |
Unfortunately I do not, but @brunoborges came up with a TOML schema proposal https://github.com/brunoborges/toml-schema. He may be able to give you more information. |
I am taking a look at implementing this. While there seem to be some existing TOML java parsers out there, I think we may get away with just using the ABNF itself: https://github.com/toml-lang/toml/blob/1.0.0/toml.abnf Unfortunately the ABNF parser generator situation doesn't look great either, but I will keep looking into this. |
@yawkat very cool. As per @aalmiray's comment, and minimal investigation I did, Jezza/toml seemed to have functional lexer -- although apparently not toml 1.0.0 compliant. But could maybe help as inspiration if nothing else. Let me if and how I can help, wrt |
I've created a draft PR for my WIP effort on this in #248, feedback would be appreciated there. |
Implemented, merged in master (3.0.0-SNAPSHOT) as well as:
|
Please add a note to https://github.com/toml-lang/toml/wiki |
Can someone else handle the submission to the TOML wiki? It looks like it would require explicitly noting that we support TOML 1.0 in the README. I'm in a new job and I haven't yet cleared up the legal parts of contributing to OSS, here. So I'm not doing any PRs at the moment :) |
No problem, I added an entry with my Github id. |
Can TOML support be added?
(see https://toml.io/en/ / https://en.wikipedia.org/wiki/TOML)
EDIT: also see https://toml.io/en/
The text was updated successfully, but these errors were encountered: