{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FunctionalDependencies #-}-- | The generalisation of a JSON object.moduleText.JSON.JSONLike(JSONLike(..))whereimportData.ByteStringimportqualifiedData.TrieasTimportText.JSONbimportqualifiedText.JSONasJimportText.JSON.Types-- | The generalisation of a JSON object.classJSONLikejsaof|j->s,j->a,j->o,o->fwhere-- | Deconstructs a JSON object.foldJSON::x-- ^ If a JSON null value.->x-- ^ If a JSON true value.->x-- ^ If a JSON false value.->(Rational->x)-- ^ If a JSON number value.->(s->x)-- ^ If a JSON string value.->(aj->x)-- ^ If a JSON array value.->(oj->x)-- ^ If a JSON object value.->j->x-- | Constructs a JSON null value.jnull::j-- | Constructs a JSON true value.jtrue::j-- | Constructs a JSON false value.jfalse::j-- | Constructs a JSON number value from the given rational.jnumber::Rational->j-- | Constructs a JSON string value from the given string.jstring::s->j-- | Constructs a JSON array value from the given array.jarray::aj->j-- | Constructs a JSON object value from the given object.jobject::oj->jinstanceJSONLikeJSONByteString[]T.TrieByteStringwherefoldJSONn______Null=nfoldJSON_tf____(Booleanb)=ifbthentelseffoldJSON___r___(Numberr')=rr'foldJSON____s__(Strings')=ss'foldJSON_____a_(Arraya')=aa'foldJSON______o(Objecto')=oo'jnull=Nulljtrue=BooleanTruejfalse=BooleanFalsejnumber=Numberjstring=Stringjarray=Arrayjobject=ObjectinstanceJSONLikeJ.JSValue[Char][]J.JSObject[Char]wherefoldJSONn______J.JSNull=nfoldJSON_tf____(J.JSBoolb)=ifbthentelseffoldJSON___r___(J.JSRational_r')=rr'foldJSON____s__(J.JSString(JSONStrings'))=ss'foldJSON_____a_(J.JSArraya')=aa'foldJSON______o(J.JSObjecto')=oo'jnull=J.JSNulljtrue=J.JSBoolTruejfalse=J.JSBoolFalsejnumber=J.JSRationalFalsejstring=J.JSString.JSONStringjarray=J.JSArrayjobject=J.JSObject-- orphan instanceinstanceFunctorJ.JSObjectwherefmapf=J.toJSObject.fmap(fmapf).J.fromJSObject