Skip to content

fathomas/json-patch-to-mongodb-ops

Repository files navigation

🥭 json-patch-to-mongodb-ops

This repository contains a script written in TypeScript to convert JSON Patch to MongoDB update operations, which can be written in bulk without querying and loading the target document into memory. This makes applying JSON Patch to a MongoDB document faster and more memory-efficient.

Supported JSON Patch operations: add, remove, replace, copy and move.

The functionality of the script has been tested using this test set of operations.

Usage

Copy jsonPatchToMongoDbOps.ts to your project and integrate the dependencies listed in package.json.

About

TypeScript code to convert JSON Patch to bulk-writable MongoDB operations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published