Skip to main content
Module

x/dtils/mod.unstable.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.4.0/mod.unstable.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>