Skip to main content
Module

x/netzo/mod.ts>json

Netzo - roll out internal tools faster
Go to Latest
function json
import { json } from "https://deno.land/x/netzo@v0.1.58/mod.ts";

Converts an object literal to a JSON string and returns a Response with application/json as the content-type.

Examples

Example 1

import { serve, json } from "https://deno.land/x/sift/mod.ts"

serve({
 "/": () => json({ message: "hello world"}),
})

Parameters

jsobj: Parameters<JSON.stringify>[0]
optional
init: ResponseInit