Version: v0.7.1 - Beta.  We welcome contributors & feedback.

Output.sendJson

Output.sendJson($map, $expirationSecs=0) -> false

Description

Stringify a Map and respond with an application/json document.

An Expires header will be set for $expirationSecs from the current date time.

$data = {
    name: 'Thomas',
    id: 123,
}

Output.sendJson($data)

See Also