Skip to content

Commit b33a6bd

Browse files
authored
Merge pull request #333 from agourlay/optimize-circe-makeObject
Optimization: Reuse Map when when building a Circe JsonObject
2 parents a51531b + 70819a7 commit b33a6bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

circe/shared/src/main/scala/diffson/circe/package.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ package object circe {
4242
Json.fromValues(values)
4343

4444
def makeObject(fields: Map[String, Json]): Json =
45-
Json.fromFields(fields)
45+
Json.fromJsonObject(JsonObject.fromMap(fields))
4646

4747
def show(json: Json): String =
4848
json.noSpaces

0 commit comments

Comments
 (0)