I'm new to Magento 2 and I'm trying to create a module that uses Zend Json Server.

The initial code in the module controller was (in Magento 1):

public function postAction()
$server = new Zend_Json_Server();
    $client = new MyClientClass();

How do I replace it in Magento 2? Thanks


After trying so many times I figured it out and thought to share.

$server = new \Zend\Json\Server\Server();
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.