Starcounter-Jack/JSON-Patch — pull request #35 by jmeas (2014-06-20 05:49:59+00:00)
Title: Fixes swapping objects.

This resolves #30.

It needs tests, but I figured I'd open the PR to get the discussion going.

To test,

```js
// On master, you'll get an error
var patch = jsonpatch.compare({a: {}}, {a: null});

// On my branch, you get a diff:
patch === {
op: "replace"
path: "/a"
value: true
};
```