Skip to content

Commit

Permalink
mapToJson to produce ToSomeJsonObject (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
nrktkt authored Jun 13, 2024
1 parent f5f4022 commit ef0dc7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ninny/src/nrktkt/ninny/ToJsonInstances.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ trait ToJsonInstances
*/
implicit val unitToJson: ToSomeJson[Unit] = _ => JsonArray(Nil)

implicit def mapToJson[A: ToJson]: ToSomeJson[Map[String, A]] =
implicit def mapToJson[A: ToJson]: ToSomeJsonObject[Map[String, A]] =
m =>
JsonObject(m.collect(Function.unlift { case (k, v) =>
v.toJson.map(k -> _)
Expand Down

0 comments on commit ef0dc7e

Please sign in to comment.