Module

Simple.JSON

Package
purescript-simple-json
Repository
justinwoo/purescript-simple-json

#E Source

type E a = Either MultipleErrors a

An alias for the Either result of decoding

#readJSON Source

readJSON :: forall a. ReadForeign a => String -> E a

Read a JSON string to a type a while returning a MultipleErrors if the parsing failed.

#readJSON' Source

readJSON' :: forall a. ReadForeign a => String -> F a

Read a JSON string to a type a using F a. Useful with record types.

#writeJSON Source

writeJSON :: forall a. WriteForeign a => a -> String

Write a JSON string from a type a.

#write Source

write :: forall a. WriteForeign a => a -> Foreign

#read Source

read :: forall a. ReadForeign a => Foreign -> E a

#read' Source

read' :: forall a. ReadForeign a => Foreign -> F a

#ReadForeign Source

class ReadForeign a  where

A class for reading foreign values to a type

Members

Instances

#ReadForeignFields Source

class ReadForeignFields (xs :: RowList) (from :: # Type) (to :: # Type) | xs -> from to where

A class for reading foreign values from properties

Members

Instances

#ReadForeignVariant Source

class ReadForeignVariant (xs :: RowList) (row :: # Type) | xs -> row where

Members

Instances

#WriteForeignFields Source

class WriteForeignFields (rl :: RowList) row (from :: # Type) (to :: # Type) | rl -> row from to where

Members

Instances

#WriteForeignVariant Source

class WriteForeignVariant (rl :: RowList) (row :: # Type) | rl -> row where

Members

Instances

Modules
Simple.JSON