I would like to include a BuiltinString
in a datum but am unable to do so as BuiltinString
has neither a FromJSON
nor a ToJSON
instance. Is there an alternative to implementing these instances by hand?
1 Answer
BuiltinString
has no ToData
instance so it cannot be used as Datum. One option is to encodeUtf8
and use the BuiltinByteString
. Not sure why you want to use JSON though.