Skip to main content
Module

x/dtils/fs.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/fs.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>