Skip to content

Commit

Permalink
Add Name ToJSONKey instance
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPenner committed Feb 5, 2024
1 parent 4eb0147 commit 4b9ca79
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions unison-share-api/src/Unison/Server/Orphans.hs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ instance ToJSON Name where
toEncoding = toEncoding . Name.toText
toJSON = toJSON . Name.toText

instance ToJSONKey Name where
toJSONKey = contramap Name.toText (toJSONKey @Text)

instance ToSchema Name where
declareNamedSchema _ = declareNamedSchema (Proxy @Text)

Expand Down

0 comments on commit 4b9ca79

Please sign in to comment.