Skip to content

Add JVM-based JSON formatter #850

Closed

Description

@jamietanna

It would be good to have a JVM-only version of JSON formatters, without needing to have prettier installed.

I'd be happy to contribute this, for Gradle - would it be best to raise a PR to add this formatter, or shall I create it as a separate project?

Activity

  1. nedtwigg commented on Apr 22, 2021

    @nedtwigg
    Member

    JVM-only json formatter is very welcome! If you can implement it without any third-party dependencies, then it can live in lib like the sql formatter.

    If it needs just third-party dependencies then it should live in lib-extra.

    // misc useful utilities
    implementation "com.diffplug.durian:durian-core:${VER_DURIAN}"
    implementation "com.diffplug.durian:durian-collect:${VER_DURIAN}"
    // needed by GitAttributesLineEndings
    implementation "org.eclipse.jgit:org.eclipse.jgit:${VER_JGIT}"
    implementation "com.googlecode.concurrent-trees:concurrent-trees:2.6.1"
    // used for xml parsing in EclipseFormatter
    implementation "org.codehaus.groovy:groovy-xml:3.0.7"

    If the dependencies you need cause a lot of conflicts (ala #587), then we can always pull it out into a third-party lib later on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions