←back to thread

JSON Patch

(zuplo.com)
299 points DataOverload | 1 comments | | HN request time: 0.201s | source
Show context
zzbzq ◴[] No.41881636[source]
Never liked it. Ignores the wonderful fact that javascript's type system natively distinguishes undefined from null values.

{ "name": "bob", "phone" null }

This would set the name to bob, null out the phone, but leave all other fields untouched. No need for a DSL-over-json.

Only trouble is static type people love their type serializers, which are ever at a mismatch with the json they work with.

replies(3): >>41881682 #>>41881803 #>>41881861 #
1. mnahkies ◴[] No.41881803[source]
You're looking for JSON merge patch which they briefly mentioned https://www.rfc-editor.org/rfc/rfc7386