Add JSONCompareMode to asserts (issue #19)

Fix for #19.

James, can you look this over, and merge if it looks ok?