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

JSON support #227

Open
dugajean opened this issue Feb 6, 2021 · 2 comments
Open

JSON support #227

dugajean opened this issue Feb 6, 2021 · 2 comments

Comments

@dugajean
Copy link

dugajean commented Feb 6, 2021

As a newcomer to Java coming from JavaScript and PHP, I'm really used to JSON configurations. Would be pretty awesome if it was supported.

Thanks!

@metacubed
Copy link

(Note: I'm not a contributor to Takari, just commenting on what I've found useful.)

Since YAML is a super-set of JSON, you can actually use polyglot-yaml and write your pom.yaml files in JSON format - they will parse correctly. I think you still have to keep the "yaml" file extension.

Also, try out polyglot-groovy. Interestingly, the converted POM is very "JSON-like", with some additional benefits. It does need a Groovy install in addition to Maven, though.

@ADTC
Copy link

ADTC commented Aug 7, 2021

@takari please consider adding pom.json as an accepted POM file for YAML if you don't plan to add JSON as a new artifact. This will allow IDEs and code editors to correctly consume the file, giving developers the ability to write the JSON format augmented with IDE features. If we have to write JSON inside a pom.yaml file, most IDEs would not understand it and we'll miss out on all the IDE features that a JSON file would have. It will also be difficult to validate the JSON content.

It would actually be better to implement new JSON artifact, based on this: https://www.baeldung.com/maven-polyglot

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

3 participants