Compare JSON values structurally in test operations
A patch test fails when an object has equivalent members in a different insertion order. Implement recursive JSON equality with unordered object keys, ordered arrays and strict primitive types.
Choose an environment, investigate the existing implementation and use the tests to check your change. Sign in to open a workspace; execution and Ono usage follow your plan’s allowances.
Apply RFC 6901 pointers and the add/remove/replace/move/copy/test operations of RFC 6902 to bounded JSON documents. The additional merge operation applies RFC 7396 at its selected existing value. No external files, JavaScript expressions or network resources are loaded.
Empty pointer means the root; / means an empty object key. Decode ~1 and ~0 exactly once. Array indices are canonical nonnegative decimal strings, with - allowed only for add/append. Array add inserts; replace/remove require an existing member. Removing the root is deliberately unsupported.
Test uses structural JSON equality: object member order is irrelevant, array order matters and primitive types remain distinct. Copy deep-copies its source. Move removes the source before resolving the destination and forbids moving a value beneath itself.
The complete operation list is atomic. On failure return ok=false, the named error and the original document. Successful requests return the resulting JSON value and must leave the request object unchanged. Reject prototype-related keys, malformed pointers, oversized/deep documents and invalid operations.
Merge patch recursively combines objects, deletes members with null patches and replaces arrays or primitives as complete values. A null root merge produces a JSON null. The same checked-in domain code runs inside the JavaScript, React, Vue and Angular workbenches.
Validate the complete document after every operation, including copied subtrees. Limit nesting to 30 levels, each container to 1000 members and a validated document to 10000 values. All introduced object keys pass the same safety check.
Apply RFC 6901 pointers and the add/remove/replace/move/copy/test operations of RFC 6902 to bounded JSON documents. The additional merge operation applies RFC 7396 at its selected existing value. No external files, JavaScript expressions or network resources are loaded.
Empty pointer means the root; / means an empty object key. Decode ~1 and ~0 exactly once. Array indices are canonical nonnegative decimal strings, with - allowed only for add/append. Array add inserts; replace/remove require an existing member. Removing the root is deliberately unsupported.
Test uses structural JSON equality: object member order is irrelevant, array order matters and primitive types remain distinct. Copy deep-copies its source. Move removes the source before resolving the destination and forbids moving a value beneath itself.
The complete operation list is atomic. On failure return ok=false, the named error and the original document. Successful requests return the resulting JSON value and must leave the request object unchanged. Reject prototype-related keys, malformed pointers, oversized/deep documents and invalid operations.
Merge patch recursively combines objects, deletes members with null patches and replaces arrays or primitives as complete values. A null root merge produces a JSON null. The same checked-in domain code runs inside the JavaScript, React, Vue and Angular workbenches.
Validate the complete document after every operation, including copied subtrees. Limit nesting to 30 levels, each container to 1000 members and a validated document to 10000 values. All introduced object keys pass the same safety check.
Apply RFC 6901 pointers and the add/remove/replace/move/copy/test operations of RFC 6902 to bounded JSON documents. The additional merge operation applies RFC 7396 at its selected existing value. No external files, JavaScript expressions or network resources are loaded.
Empty pointer means the root; / means an empty object key. Decode ~1 and ~0 exactly once. Array indices are canonical nonnegative decimal strings, with - allowed only for add/append. Array add inserts; replace/remove require an existing member. Removing the root is deliberately unsupported.
Test uses structural JSON equality: object member order is irrelevant, array order matters and primitive types remain distinct. Copy deep-copies its source. Move removes the source before resolving the destination and forbids moving a value beneath itself.
The complete operation list is atomic. On failure return ok=false, the named error and the original document. Successful requests return the resulting JSON value and must leave the request object unchanged. Reject prototype-related keys, malformed pointers, oversized/deep documents and invalid operations.
Merge patch recursively combines objects, deletes members with null patches and replaces arrays or primitives as complete values. A null root merge produces a JSON null. The same checked-in domain code runs inside the JavaScript, React, Vue and Angular workbenches.
Validate the complete document after every operation, including copied subtrees. Limit nesting to 30 levels, each container to 1000 members and a validated document to 10000 values. All introduced object keys pass the same safety check.
Apply RFC 6901 pointers and the add/remove/replace/move/copy/test operations of RFC 6902 to bounded JSON documents. The additional merge operation applies RFC 7396 at its selected existing value. No external files, JavaScript expressions or network resources are loaded.
Empty pointer means the root; / means an empty object key. Decode ~1 and ~0 exactly once. Array indices are canonical nonnegative decimal strings, with - allowed only for add/append. Array add inserts; replace/remove require an existing member. Removing the root is deliberately unsupported.
Test uses structural JSON equality: object member order is irrelevant, array order matters and primitive types remain distinct. Copy deep-copies its source. Move removes the source before resolving the destination and forbids moving a value beneath itself.
The complete operation list is atomic. On failure return ok=false, the named error and the original document. Successful requests return the resulting JSON value and must leave the request object unchanged. Reject prototype-related keys, malformed pointers, oversized/deep documents and invalid operations.
Merge patch recursively combines objects, deletes members with null patches and replaces arrays or primitives as complete values. A null root merge produces a JSON null. The same checked-in domain code runs inside the JavaScript, React, Vue and Angular workbenches.
Validate the complete document after every operation, including copied subtrees. Limit nesting to 30 levels, each container to 1000 members and a validated document to 10000 values. All introduced object keys pass the same safety check.