seedling-data-plugin-json

A data plugin to read and parse JSON data.

Usage

  1. Create a new file in /data with the name json.ts.
import json from "https://deno.land/x/seedling_data_plugin_json@0.0.1/mod.ts";
export default json;
  1. Use with seedling data directive. There are three ways to use the directive.

As raw inline JSON

  <:data use="json">
    {
      "key": "value"
    }
  </:data>

From a local file

<:data use="json" file="path/to/json/file.json" />

Note - This plugin requires the --allow-read command line parameter for Deno when using file attribute.

From a remote url

<:data use="json" url="https://example.com/path/to/file.json" />

Note - This plugin requires the --allow-net command line parameter for Deno when using url attribute.