Add spec for testing JSON endpoints