add support for json patch

http://tools.ietf.org/html/rfc6902#section-4.1