@did-btc1/common
    Preparing search index...

    Class Patch

    Implementation of IETF RFC 6902 JSON Patch.

    JavaScript Object Notation (JSON) Patch defines a JSON document structure for expressing a sequence of operations to apply to a JavaScript Object Notation (JSON) document; it is suitable for use with the HTTP PATCH method. The "application/json-patch+json" media type is used to identify such patch documents.

    Patch

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Find the diff between a source and target document constructing the patch operations from source => target.

      Parameters

      • sourceDocument: JSONObject

        The original JSON object.

      • targetDocument: JSONObject

        The target JSON object to transform into.

      • path: string

      Returns PatchOperation[]

      An array of JSON Patch operations.