Define JSON conditionally.

Fixes #134.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>