Saltar al contenido principal

JSON Patch and Merge Patch Reference Deck

Recall when and how to use JSON Patch and JSON Merge Patch safely.

working-with-json4 min read

Operation What does JSON Patch test do? It checks that a value at a path matches the expected value before later operations proceed. Use it as an optimistic guard, such as testing /version before replacing a field. Compare JSON Patch vs Merge Patch Patch says what to do; Merge Patch says what the object should partially become. Objection Let's send the whole object back; it is simpler. The client only loaded one tab of a large editable resource. Your line Full replacement is simple only when the client owns the whole current resource. Here it risks overwriting fields the client…

Read the full lesson

Sign up free: one personalized lesson every day, matched to your role and goals.

← Back to library

Contáctanos