Module

Data.HObject

Package
purescript-homogeneous-objects
Repository
Risto-Stevcev/purescript-homogeneous-objects

#(-=) Source

Operator alias for Data.HObject.mkLeaf (non-associative / precedence 7)

#mkLeaf Source

mkLeaf :: forall a. String -> a -> Tuple String (TupleTree a)

#(-<) Source

Operator alias for Data.HObject.mkBranch (non-associative / precedence 7)

#mkBranch Source

#mkTree Source

mkTree :: forall a. (Array (Tuple String (TupleTree a))) -> TupleTree a

#hJson Source

hJson :: forall a. EncodeJson a => (Array (Tuple String (TupleTree a))) -> Json

#hObj Source

hObj :: forall a. (Array (Tuple String (TupleTree a))) -> HObject a

#TupleTree Source

data TupleTree a

If a homogenous record is needed but not used by the FFI, a TupleTree might work better since you can make use of the instances of the Tuple class

Instances

#HObject Source

data HObject :: Type -> Type

The HObject type is provided for more complex types that are not meant to be JSON encoded but still need to be accessed by the FFI. It is interally represented as a homogenous JSON object

Instances

#hObjToJson Source

hObjToJson :: forall a. EncodeJson a => HObject a -> Json

Converts an hObject to Json