<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[
<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[
Zend_View_Helper_Json is a view helper for serializing data to JSON and sending an immediate JSON response to the client.Zend Framework: Zend_View_Helper_Json Component Proposal
Proposed Component Name
Zend_View_Helper_Json
Developer Notes
http://framework.zend.com/wiki/display/ZFDEV/Zend_View_Helper_Json
Proposers
Matthew Weier O'Phinney
Revision
0.9.0 - 03 January 2008: Initial proposal release
0.9.1 - 04 January 2008: Initial code released on laboratory
0.9.2 - 08 January 2008: Updated with feedback from Zend team; no longer exits; adds action helper version; disables layouts (wiki revision: 8)Table of Contents
1. Overview
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
4. Dependencies on Other Framework Components
- Zend_Json
- Zend_Controller_Response_Abstract (via Zend_Controller_Front)
- Zend_Controller_Action_Helper_Abstract
5. Theory of Operation
The helper is called as a normal view helper, serializes the data passed to it, sets the appropriate response header, disables layouts, and returns the serialized JSON.
Called as an action helper, it does all of the above, as well as sets the reponse body to the serialized JSON data.
6. Milestones / Tasks
- Milestone 1: [ZFPROP:DONE] Create proposal for review
- Milestone 2: [ZFPROP:DONE] Create working tests and code in laboratory
- Milestone 3: Move working tests and code to incubator
- Milestone 4: Create documentation in incubator
- Milestone 5: Publish to core
7. Class Index
- Zend_View_Helper_Json
- Zend_Controller_Action_Helper_Json
8. Use Cases
| UC-01 |
|---|
In a view script:
| UC-02 |
|---|
In an action controller:
1 Comment
comments.show.hideJan 09, 2008
Darby Felton
<ac:macro ac:name="note"><ac:parameter ac:name="title">Zend Comments</ac:parameter><ac:rich-text-body>
<p>This proposal is approved for incubator development, and the following issues are to be addressed:</p>
<ul>
<li>Helper should not exit or send response</li>
<li>Helper should disable layouts</li>
<li>Add a JSON action helper as part of the proposal</li>
</ul>
</ac:rich-text-body></ac:macro>