Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/dtils/mod.ts>readJson

The best unofficial library of utilities for Deno applications
Go to Latest
function readJson
import { readJson } from "https://deno.land/x/dtils@2.5.0/mod.ts";

Read a file, parsing it as json. Returns an empty object if the file doesn't exist or can't be parsed.

NOTICE: At the next major release, this will return Json|null

Parameters

file: string

Returns

Promise<Json>