@flatfile/plugin-json-extractor v0.11.0
The @flatfile/json-extractor plugin parses a JSON file and extracts first-level nested objects as Sheets in Flatfile.
Event Type:
listener.on('file:created')
Supported file types:
.json
When embedding Flatfile, this plugin should be deployed in a server-side listener. Learn more
Parameters
options.chunkSize - default: "10_000" - number - (optional)
The chunkSize parameter allows you to specify the quantity of records to in each chunk.
options.parallel - default: "1" - number - (optional)
The parallel parameter allows you to specify the number of chunks to process in parallel.
API Calls
api.files.downloadapi.files.getapi.files.updateapi.jobs.ackapi.jobs.completeapi.jobs.createapi.jobs.failapi.jobs.updateapi.records.insertapi.workbooks.create
Usage
Listen for a JSON file to be uploaded to Flatfile. The platform will then extract the file automatically. Once complete, the file will be ready for import in the Files area.
npm i @flatfile/plugin-json-extractorimport { JSONExtractor } from "@flatfile/plugin-json-extractor";listener.use(JSONExtractor());Full Example
In this example, the JSONExtractor is initialized, and then registered as middleware with the Flatfile listener. When a JSON file is uploaded, the plugin will extract the structured data and process it the extractor's parser.
import { JSONExtractor } from "@flatfile/plugin-json-extractor";
// Initialize the JSON extractor
const jsonExtractor = JSONExtractor();
// Register the extractor as a middleware for the Flatfile listener
listener.use(jsonExtractor);
// When a JSON file is uploaded, the data will be extracted and processed using the extractor's parser.See a working example in our flatfile-docs-kitchen-sink Github repo.
11 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago