extism-manifest-0.1.0: Extism manifest bindings
Safe HaskellSafe-Inferred
LanguageHaskell2010

Extism.JSON

Documentation

newtype Base64 Source #

Constructors

Base64 ByteString 

Instances

Instances details
JSON Base64 Source # 
Instance details

Defined in Extism.JSON

Methods

readJSON :: JSValue -> Result Base64

showJSON :: Base64 -> JSValue

readJSONs :: JSValue -> Result [Base64]

showJSONs :: [Base64] -> JSValue

data Nullable a Source #

Constructors

Null 
NotNull a 

Instances

Instances details
JSON a => JSON (Nullable a) Source # 
Instance details

Defined in Extism.JSON

Methods

readJSON :: JSValue -> Result (Nullable a)

showJSON :: Nullable a -> JSValue

readJSONs :: JSValue -> Result [Nullable a]

showJSONs :: [Nullable a] -> JSValue

makeArray :: JSON a => [a] -> JSValue Source #

isNull :: JSValue -> Bool Source #

filterNulls :: [(a, JSValue)] -> [(a, JSValue)] Source #

object :: [(String, JSValue)] -> JSValue Source #

objectWithNulls :: [(String, JSValue)] -> JSValue Source #

(.=) :: JSON a => a -> a -> (a, JSValue) Source #

mapNullable :: (t -> a) -> Nullable t -> Nullable a Source #

(.?) :: JSON a => JSValue -> String -> Nullable a Source #

(.??) :: Eq a => [(a, a)] -> a -> Nullable a Source #

find :: JSON a => String -> JSValue -> Nullable a Source #

update :: JSON a => String -> a -> JSValue -> JSValue Source #