Dru
Dru

Reputation: 556

ZF3 - Class 'Zend\Json\Json' not found

In zf3 while trying to use JsonModel I get error

Fatal error: Uncaught Error: Class 'Zend\Json\Json' not found in \vendor\zendframework\zend-view\src\Model\JsonModel.php:

Upvotes: 0

Views: 1886

Answers (1)

user2408230
user2408230

Reputation:

You probably didn't include zendframework/zend-json. You can do this by running this in your terminal:

$ composer require zendframework/zend-json

zend-json, as many other components, is a suggested package when zend-view is installed. But since there are many more suggested packages you might have missed that message.

Upvotes: 6

Related Questions