Module
Simple.JSON
- Package
- purescript-simple-json
- Repository
- justinwoo/purescript-simple-json
#readJSON Source
readJSON :: forall a. ReadForeign a => String -> F aRead a JSON string to a type a using F a. Useful with record types.
#writeJSON Source
writeJSON :: forall a. WriteForeign a => a -> StringWrite a JSON string from a type a.
#write Source
write :: forall a. WriteForeign a => a -> Foreign#ReadForeign Source
class ReadForeign a whereA class for reading foreign values to a type
Members
Instances
ReadForeign ForeignReadForeign CharReadForeign NumberReadForeign IntReadForeign StringReadForeign Boolean(ReadForeign a) => ReadForeign (Array a)(ReadForeign a) => ReadForeign (NullOrUndefined a)(ReadForeign a) => ReadForeign (Maybe a)(ReadForeign a) => ReadForeign (StrMap a)(RowToList fields fieldList, ReadForeignFields fieldList () fields) => ReadForeign (Record fields)
#ReadForeignFields Source
class ReadForeignFields (xs :: RowList) (from :: Row Type) (to :: Row Type) | xs -> from to whereA class for reading foreign values from properties
Members
Instances
(IsSymbol name, ReadForeign ty, ReadForeignFields tail from from', RowLacks name from', RowCons name ty from' to) => ReadForeignFields (Cons name ty tail) from toReadForeignFields Nil () ()
#WriteForeign Source
class WriteForeign a whereA class for writing a value into JSON need to do this intelligently using Foreign probably, because of null and undefined whatever
Members
Instances
WriteForeign ForeignWriteForeign StringWriteForeign IntWriteForeign CharWriteForeign NumberWriteForeign Boolean(WriteForeign a) => WriteForeign (Array a)(WriteForeign a) => WriteForeign (NullOrUndefined a)(WriteForeign a) => WriteForeign (Maybe a)(WriteForeign a) => WriteForeign (StrMap a)(RowToList row rl, WriteForeignFields rl row () to) => WriteForeign (Record row)
#WriteForeignFields Source
class WriteForeignFields (rl :: RowList) row (from :: Row Type) (to :: Row Type) | rl -> row from to whereMembers
writeImplFields :: forall g. g rl -> Record row -> Builder (Record from) (Record to)
Instances
(IsSymbol name, WriteForeign ty, WriteForeignFields tail row from from', RowCons name ty whatever row, RowLacks name from', RowCons name Foreign from' to) => WriteForeignFields (Cons name ty tail) row from toWriteForeignFields Nil row () ()
- Modules
- Simple.
JSON