title: Zend rpc json return array
body: <p>Hi there I have a small problem i can't figure out. Im writing a RPC service using ZendFramework and Apigility. The response must be a json array. Next comes all the content negotiation code.</p>
  
  <pre><code>'controllers' =&gt; array(
          'NmdaWebApi\\V1\\Rpc\\Hola\\Controller' =&gt; 'Json',
  
  'accept_whitelist' =&gt; array(
          'NmdaWebApi\\V1\\Rpc\\Hola\\Controller' =&gt; array(
              0 =&gt; 'application/vnd.nmda-web-api.v1+json',
              1 =&gt; 'application/json',
              2 =&gt; 'application/*+json',
          ),
  'content_type_whitelist' =&gt; array(
          'NmdaWebApi\\V1\\Rpc\\Hola\\Controller' =&gt; array(
              0 =&gt; 'application/json',
          ),
  </code></pre>
  
  <p>This is how I have the controller </p>
  
  <pre><code>class HolaController extends AbstractActionController{
          public function holaAction(){
                  return array(1,2,3,4,5);}}
  </code></pre>
  
  <p>And here is the returned json.</p>
  
  <pre><code>{"0":1,"1":2,"2":3,"3":4,"4":5}
  </code></pre>
  
  <p>I'm getting this list and a I want an array. Here is another example.</p>
  
  <pre><code>return array(1,2,3,4,array(5,6,7));
  {"0":1,"1":2,"2":3,"3":4,"4":[5,6,7]}
  </code></pre>
  
  <p>Can someone explain me how to avoid this?</p>
  
  <p><strong>Edit_1</strong></p>
  
  <p>I figured out a workaround. Using HalJson fixes the problem. But i still cant understand why it doesnt work with normal Json.</p>
  
  <pre><code>'controllers' =&gt; array(
          'NmdaWebApi\\V1\\Rpc\\Hola\\Controller' =&gt; 'HalJson',
  </code></pre>