Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/esm/reader.js>readAsJSON

A JavaScript extension package for building strong and modern applications.
Latest
function readAsJSON
import { readAsJSON } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/reader.js";

Reads all data from the given source to a JSON object.

Examples

Example 1

import { readAsJSON } from "@ayonli/jsext/reader";
import { createReadableStream } from "@ayonli/jsext/fs";

const stream = createReadableStream("./package.json");
const pkg = await readAsJSON(stream);