Deno.js Tutorial to Parse JSON Objects Schema in Oak Framework Using jsonParser Middleware in TypeScript Full Project For Beginners

 

JSON Parser

Parsing JSON middleware for oka framework

Usage

// import oak framework
import { Application } from "https://deno.land/x/oak/mod.ts";
// import json parser
import { jsonParser } from "https://raw.githubusercontent.com/gjuoun/oak-json-parser/master/mod.ts"

const app = new Application();

app.use(jsonParser())

app.use(async (ctx) => {
  ctx.request.json // will become available
});

await app.listen({ port: 8000 });

Leave a Reply