| Zend_Config_Json |
Zend Framework: Zend_Config_Json Component Proposal
| Proposed Component Name | Zend_Config_Json |
|---|---|
| Developer Notes | http://framework.zend.com/wiki/display/ZFDEV/Zend_Config_Json |
| Proposers | Sudheer Satyanarayana |
| Zend Liaison | TBD |
| Revision | 1.0 - 22 November 2009: Initial Draft. (wiki revision: 26) |
Table of Contents
1. Overview
Zend_Config_Json reads a text configuration file whose contents are in JSON format.
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
- This component will read a configuration file whose contents are in JSON format
- The component will support configuration sections
- This component will will not save information to the storage media. Zend_Config_Writer_Json will be proposed once we freeze the specification of this component.
4. Dependencies on Other Framework Components
- Zend_Config
- Zend_Json
5. Theory of Operation
This component works much like Zend_Config_Ini and Zend_Config_Xml offering another data format support - JSON.
6. Milestones / Tasks
- Milestone 1: Complete writing this proposal
- Milestone 2: Working prototype checked into the incubator
- Milestone 4: Unit tests exist, work, and are checked into SVN.
- Milestone 5: Initial documentation exists.
7. Class Index
- Zend_Config_Json
- Zend_Config_Writer_Json
8. Use Cases
| UC-01 |
|---|
application/configs/database.json
The wiki doesn't seem to allow me to print curly braces. For now, please assume the contents of the file are enclosed within curly braces.
I have attached the sample JSON configuration file to this proposal.
In a PHP script
7 Comments
comments.show.hideNov 23, 2009
Stanislav Malyshev
I've actually done some code for JSON in the lab, look here:
http://framework.zend.com/svn/framework/laboratory/library/Zend/Config/
Does it do what you wanted?
Nov 23, 2009
Sudheer Satyanarayana
Looks like it does.
I will go through the code thoroughly this weekend.
Dec 16, 2009
Stanislav Malyshev
Any feedback on that?
Dec 16, 2009
Sudheer Satyanarayana
I haven't been able to study the code yet. I will update here when I do.
Jul 22, 2010
Nick Daugherty
Is there any progress on this? Seems like this would be an easy addition. I can take over if propasal has been abandoned.
Sep 19, 2010
Sudheer Satyanarayana
@Nick
Feel free to take over.
Oct 15, 2010
Matthew Weier O'Phinney
Stas pointed out this proposal and his code when he completed the Zend_Config_Yaml code, and asked if it could be reviewed. The code was complete, so I finished tests and promoted to trunk alongside the Yaml configuration. I've credited both Sudheer and Stas for the component at this time.