Use JSON.dump in spec.