For example, [this existing `EncodeJSON` instance for `Either`](https://github.com/purescript-contrib/purescript-argonaut-codecs/blob/b0317d576e10aa73600c43f835bfad45679d0aff/src/Data/Argonaut/Encode/Class.purs#L36-L42 ): ```purescript instance encodeJsonEither :: (EncodeJson a, EncodeJson b) => EncodeJson (Either a b) where encodeJson = either (obj "Left") (obj "Right") where obj :: forall c. EncodeJson c => String -> c -> Json obj tag x = fromObject $ FO.fromFoldable $ Tuple "tag" (fromString tag) : Tuple "value" (encodeJson x) : Nil ```