A parsed JSON Patch document, as described in RFC 6902 "JSON Patch".

Synopsis

Declared in <folly/json/json_patch.h>

class json_patch;

Description

Implements parsing. Application over data structures must be implemented separately.

Types

Name

Description

parse_error

Error returned when parsing a JSON patch object fails.

patch_application_error

Error returned when applying a patch fails.

patch_operation

A single JSON patch operation, whose arguments vary by operation type.

Enums

Name

Description

parse_error_code

Reason a JSON patch object failed to parse.

patch_application_error_code

Reason applying a patch operation failed.

patch_operation_code

The kind of a single JSON patch operation.

Member Functions

Name

Description

json_patch [constructor]

Constructs an empty patch.

~json_patch [destructor]

Destroys the patch.

apply

Mutates the supplied object in accordance with the patch operations.

ops

Returns the parsed patch operations.

Static Member Functions

Name

Description

try_parse

Parses a JSON patch document into a json_patch.

Created with MrDocs