Skip to content

Commit

Permalink
Use compact JSON representation
Browse files Browse the repository at this point in the history
  • Loading branch information
thyandrecardoso committed May 16, 2024
1 parent ce95607 commit d92a5f2
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 d92a5f2

Please sign in to comment.