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 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.