sidan-lab / plutus-cborhex-automation

A Haskell package for creating RESTful API endpoints for dynamic parameterized Cardano Plutus script.
15 stars 3 forks source link

Haskell Research 2: Data type casting #22

Closed HinsonSIDAN closed 1 year ago

HinsonSIDAN commented 1 year ago

We want to explore this functionality due to Issue 4. Sometimes we want to cast says Integer getting from post request endpoints to POSIXTime for Dapps to work.

Solution to be tested: Adding to the top of Haskell file

{-# LANGUAGE OverloadedStrings   #-}

It could cast String into other data type, subject to further testing

HinsonSIDAN commented 1 year ago

Accomplished by crafting JSON body for post request