vestigia-0.2.0: Where an execution depended on a secret.
Copyright(c) 2026 Jared Tobin
LicenseMIT
MaintainerJared Tobin <jared@ppad.tech>
Safe HaskellSafe-Inferred
LanguageHaskell2010

Vestigia.Json

Description

A JSON value and its encoding: enough to write a report, with object keys in the order given.

Synopsis

Documentation

data Value Source #

A JSON value. An object keeps its keys in the order given.

Constructors

Null 
Bool !Bool 
Number !Integer 
String !Text 
Array ![Value] 
Object ![(Text, Value)] 

Instances

Instances details
Show Value Source # 
Instance details

Defined in Vestigia.Json

Methods

showsPrec :: Int -> Value -> ShowS #

show :: Value -> String #

showList :: [Value] -> ShowS #

Eq Value Source # 
Instance details

Defined in Vestigia.Json

Methods

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

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

encode :: Value -> Text Source #

The value's encoding, indented two spaces per level.

>>> encode (Object [("a", Array [Number 1, Null])])
"{\n  \"a\": [\n    1,\n    null\n  ]\n}\n"