Module JSON.Convert

Author
Michael Hanus
Version
February 2025

This library defines a type class and instances for standard types to convert Curry values to JSON values and vice versa.

Exported Classes:

Exported Classes


class ConvertJSON a

Type class with two conversion operations between values and their JSON representation. Since a JSON value might not contain a correct representation of a standard value, the operation fromJSON returns a Maybe value. The additional operations on value lists are used for a better JSON conversion of strings.

Methods:

toJSON :: a -> JValue  

fromJSON :: JValue -> Maybe a  

toJSONList :: [a] -> JValue  

fromJSONList :: JValue -> Maybe [a]