drasil-data-formats-0.0.1: A framework for code and document generation for scientific software
Safe HaskellSafe-Inferred
LanguageHaskell2010

Drasil.Data.Formats.JSON

Synopsis

JSON

data JSON Source #

A JSON representation conformant with RFC 8259.

Constructors

JObject [(Text, JSON)]

Note that empty and duplicate keys are allowed, and how they are handled is up to the implementation of the reader.

JArray [JSON] 
JString Text 
JNumber Scientific 
JBool Bool 
JNull 

Instances

Instances details
IsString JSON Source #

Using the OverloadedStrings language extension, string literals can be automatically converted to JStrings.

Instance details

Defined in Drasil.Data.Formats.JSON.Core

Methods

fromString :: String -> JSON #

Show JSON Source # 
Instance details

Defined in Drasil.Data.Formats.JSON.Core

Methods

showsPrec :: Int -> JSON -> ShowS #

show :: JSON -> String #

showList :: [JSON] -> ShowS #

Eq JSON Source # 
Instance details

Defined in Drasil.Data.Formats.JSON.Core

Methods

(==) :: JSON -> JSON -> Bool #

(/=) :: JSON -> JSON -> Bool #

Rendering

data JSONRenderOptions Source #

Options for rendering JSON.

data JSONStyle Source #

JSON Style: How the overall JSON document is formatted.

Constructors

Minified

With as few characters as possible and no newlines.

Pretty Natural

In a "pretty" human readable way, with given indent size.

renderJSON :: JSONRenderOptions -> JSON -> Doc ann Source #

Render JSON to a Doc with the given options.