Skip to end of metadata
Go to start of metadata
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

9. Class Skeletons

Labels:
json json Delete
config config Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Nov 23, 2009

    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?

  2. Nov 23, 2009

    Looks like it does.

    I will go through the code thoroughly this weekend.

    1. Dec 16, 2009

      Any feedback on that?

      1. Dec 16, 2009

        I haven't been able to study the code yet. I will update here when I do.

  3. Jul 22, 2010

    Is there any progress on this? Seems like this would be an easy addition. I can take over if propasal has been abandoned.

  4. Sep 19, 2010

    @Nick

    Feel free to take over.

  5. Oct 15, 2010

    Accepted and Complete
    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.