schedule-planner

Copyright(c) Justus Adam, 2015
LicenseLGPL-3
Maintainerdevelopment@justusadam.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

SchedulePlanner.Serialize

Description

Hold the capeablilities to get and export in- and output data as well as (de)serialize it

Synopsis

Documentation

mapToJSON :: ToJSON a => Map Text a -> Value

Convert a suitable Map to a JSON Value

formatSchedule :: Show s => MappedSchedule s -> Text

Transform a MappedSchedule into a printable, and more importantly, readable Text

shortSubject :: Show s => s -> String

Shorten a subject to something printable

data DataFile

Base structure of the input JSON file

Constructors

DataFile [Rule] [Lesson Text] 

Instances

Show DataFile 
ToJSON DataFile 
FromJSON DataFile 

eitherDecode :: FromJSON a => ByteString -> Either String a

scheduleToJson :: ToJSON a => MappedSchedule a -> Value