Skip to content

Commit

Permalink
Merge pull request #719 from thyandrecardoso/circe-compact-json-string
Browse files Browse the repository at this point in the history
Use compact JSON representation in Circe addon
  • Loading branch information
tminglei authored May 18, 2024
2 parents ce95607 + d92a5f2 commit 591d6f0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ trait PgCirceJsonSupport extends json.PgJsonExtensions with utils.PgCommonJdbcTy
new GenericJdbcType[Json](
pgjson,
(v) => parse(v).getOrElse(Json.Null),
(v) => clean(v.asJson.spaces2),
(v) => clean(v.asJson.noSpaces),
hasLiteralForm = false
)

Expand All @@ -54,7 +54,7 @@ trait PgCirceJsonSupport extends json.PgJsonExtensions with utils.PgCommonJdbcTy

implicit val getJson: GetResult[Json] = mkGetResult(_.nextJson())
implicit val getJsonOption: GetResult[Option[Json]] = mkGetResult(_.nextJsonOption())
implicit val setJson: SetParameter[Json] = mkSetParameter[Json](pgjson, _.asJson.spaces2)
implicit val setJsonOption: SetParameter[Option[Json]] = mkOptionSetParameter[Json](pgjson, _.asJson.spaces2)
implicit val setJson: SetParameter[Json] = mkSetParameter[Json](pgjson, _.asJson.noSpaces)
implicit val setJsonOption: SetParameter[Option[Json]] = mkOptionSetParameter[Json](pgjson, _.asJson.noSpaces)
}
}

0 comments on commit 591d6f0

Please sign in to comment.