Adding JSON schema patch.

Much of this code is taken from the EventLogging extension,
with some minor tweaks.

Change-Id: If96d85b417725dd43a50ea9025abeca6b8de34ad