Skip to content

bartosz822/JsonMacroFormatter

 
 

Repository files navigation

JsonMacroFormatter

Scalafix rule to format json contained within Circe json literals.

E.g.

Before formatting:

val obj = json"""{"key":"value"}"""

val interpolatedObj =
  json"""{"key" : ${ obj }}"""

After formatting:

val obj = json"""{
            "key" : "value"
          }"""

val interpolatedObj =
  json"""{
    "key" : ${obj}
  }"""

Usage

Add to build.sbt:

ThisBuild / scalafixDependencies += "com.github.xplosunn" %% "JsonMacroFormatter" % "0.0.7"

Add to .scalafix.conf:

fix.JsoMacroFormatter

About

Scalafix rule to format json contained within Circe json literals

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 100.0%