title: Creating a custom JSON response object with Zend Action Helper ContextSwitch
body: <p>I normally append an encoded json object to the response body, however I now have a situation that warrants using the ContextSwitch action helper.</p>
  
  <p>I have a Zend_Form that requires three different response contexts: </p>
  
  <ol>
  <li><strong>html</strong> - Render the form as normal html
  within a layout.</li>
  <li><strong>html-partial</strong> - An ajax "get" request that renders
  just the form as html.</li>
  <li><strong>json</strong> - An ajax "post" request that returns
  any form valiation error messages.</li>
  </ol>
  
  <p>For each context I have 3 view scripts. Although the two html contexts could use the same view script, but I haven't figured out if this is possible.</p>
  
  <ul>
  <li><strong>form.phtml</strong></li>
  <li><strong>form.html.phtml</strong></li>
  <li>form.json.phtml</li>
  </ul>
  
  <p>The html context views work okay, but the json view is not being picked up. What is the best method to override the default json post callback behaviour or pass a custom encoded object to the response body?</p>