json-autotype-0.3: Automatic type declaration for JSON input data

Safe HaskellNone
LanguageHaskell2010

Data.Aeson.AutoType.Type

Synopsis

Documentation

typeSize :: Type -> Int Source

Size of the Type term.

newtype Dict Source

Constructors

Dict 

Fields

unDict :: Map Text Type
 

keys :: Dict -> Set Text Source

Take all keys from dictionary.

get :: Text -> Dict -> Type Source

Lookup the Type within the dictionary.

withDict :: (Map Text Type -> Map Text Type) -> Dict -> Dict Source

Make operation on a map to an operation on a Dict.

emptyType :: Type Source

Empty type

isSimple :: Type -> Bool Source

Is it a simple (non-compound) Type?

isArray :: Type -> Bool Source

Is the top-level constructor a TArray? | Check if the given type has non-top TObj.

isObject :: Type -> Bool Source

Is the top-level constructor a TObj?

typeAsSet :: Type -> Set Type Source

Convert any type into union type (even if just singleton).

hasNonTopTObj :: Type -> Bool Source

Check if the given type has non-top TObj.

hasTObj :: Type -> Bool Source

Check if the given type has TObj on top or within array..

isNullable :: Type -> Bool Source

Check if this is nullable (Maybe) type, or not. Nullable type will always accept TNull or missing key that contains it.