2
votes
Loading specific Datum JSON with Map structure into Plutus type
You could define a union type for values, something like
data Val = B BuiltinByteString
| M (AssocMap BuiltinByteString Val)
type OrcFax = AssocMap BuiltinByteString Val
then you can deserialise ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
plutus × 647plutus-pioneer-program × 173
smart-contract × 145
haskell × 57
plutus-playground × 55
cardano-cli × 46
pab × 45
transaction × 37
nft × 36
plutustx × 33
cabal × 29
on-chain × 28
minting × 26
script × 23
nix × 21
wallet × 20
validator × 20
native-assets × 19
plutus-starter × 19
datum × 19
cardano-node × 17
nix-shell × 13
script-addresses × 13
utxo × 12
cardano-serialization-lib × 12