Skip to main content
Module

x/dtils/mod.unstable.ts>readJsonStrict

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

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

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

Parameters

file: string

Returns

Promise<Json>