Macaroon.Serializers.JSON.encode

You're seeing just the function encode, go back to Macaroon.Serializers.JSON module for more information.
Link to this function

encode(macaroon)

Specs

encode(Macaroon.Types.Macaroon.t()) ::
  {:error,
   %{
     :__exception__ => any(),
     :__struct__ => Jason.EncodeError | Protocol.UndefinedError,
     optional(atom()) => any()
   }}
  | {:ok, binary()}