-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serializing Plutus Nothing
and Just
Maybe values.
#55
Comments
@Riley-Kilgore can you provide a more complex structure containing The binary spec (CBOR spec) for plutus datums doesn't have anything that could very obviously be Nothing/Some (unless |
I think you should be able to convert the datum to JSON and then import the JSON from CML |
We'd have to see what they would export the JSON as. The Haskell JSON format doesn't support JSON null (or true/false) so it would really depend on how Haskell turns the Haskell |
I was able to use |
I have not as of yet had any resolution to this. Is there a way for me to serialize I have not seen json parsed by the cml, what does the usage look like for this? Or am I misunderstanding? Thank you both for your time. |
@Riley-Kilgore the JSON parsing in CML is found in I'm a bit confused on if |
I"m asking because it's possible there was some typeclass implemented without this being the intention that allowed these conversions since there's nothing that is immediately obvious as a mapping to the binary spec's definition for plutus datum, and how the hex you gave seemed odd. Although maybe that hex was actually erroneous which is why I wanted to see nothing/just being used inside of more complex structures to be sure of how they're encoding it. |
Sorry, I have had a lot going on the past few days and was unable to get back to this thread. The solution I have come to thus far is simply avoiding using If you'd like I can definitely go and experiment some more with Thank you! :) |
I am trying to utilize a contract that uses a Plutus Maybe in the Datum.
I am trying to serialize
Nothing
using the cardano-multiplatform-lib, when this is done in Haskell the cborHex output is "\128".Is there any way currently to accomplish this?
The text was updated successfully, but these errors were encountered: