You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by Apache Wiki <wi...@apache.org> on 2007/07/13 10:14:47 UTC

[Ws Wiki] Update of "GSOC2007/JSON Support Axis2C/ProjectProgress" by GSOC2007

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ws Wiki" for change notification.

The following page has been changed by GSOC2007:
http://wiki.apache.org/ws/GSOC2007/JSON_Support_Axis2C/ProjectProgress

New page:
= JSON Support Axis2C =
== ProjectProgress ==

JSON support for Axis2/C project progress is outlined under this page. 
The project deliveribles,  important issues and final solutions stated on monthly/weekly basic. 

Duration : 1 st of May – 1 st of June 

 *The initial design of the project was finalized and start the implementation of the JSON object model. The design of the Object model was based on JSON-C implementation which is avalable at the JSON home page. 

 *Since the project is based on Axis2/C, the studies on Axis 2/C was also required. 

 *The object model was tested and as I proposed in the project proposal a  StAX JSON parser should use to generate StAX events when we are parsing the JSON string. A preliminary studies on StAX was conducted during this period. 

 *When designing the StAX parser, the axiom StAX wrappers (axiom_xml_reader.h, axiom_xml_writer.h) should be considered and the implementation of the StAX parser should be scnc. with the wrappers.

 *A simple JSON StAX parser was implemented based on JSON object model.


Duration :  2 nd of June – 15 st of June

 *In the case of the implemention of the StAX parser there was an issue on the integration it with Axis2/C. This problem was discussed on the Axis2/C-dev mailing list and we finally decided to not to have StAX parser. Other than the parser simply converte the JSON to XML (reader) and XML to JSON(writer).

 *The JSON to XML conversion can be done using two different conventions; Badgerfish and Mapped conventions. Therefore, there should be a way to switch between those parsers based on convention. This issue was also discussed on the mailing list and finalize the following design.

JSON_StAX_PARSER
 - READER
    - Badgerfish Reader
    - Mapped Reader
 - WRITER
    - Badgerfish Writer
    - Mapped Writer

The StAX parser has reader and writer which are having two implementations of each conventions. So, when we are creating the StAX parser, the convention should be initialized.


Duration :  16 th of June – 6 st of July

 *The implementation of the Badgerfish reader for parsing JSON string was implemented. In this case even if we used the conversion of JSON to XML, we can’t do inline parsing from JSON to XML because of the limitations such as namespace and attrinutes. (i.e. attributes/namespace are coming at the end of the JSON element.).  Therefore we have to parser the whole JSON string before converting to XML.

 *In the Badgerfish convention the XML mixed contenet was not supported. So the JSON Badgerfish reader should have a proper way to represent the mixed content.

 *The solution that I found was as follows.

<alice>bob

<charlie>david</charlie>edgar 

</alice>



The relevant JSON string is as follows

{ "alice": [   { "$": "bob" }, 
               { "charlie": { "$": "david" } }, 
               { "$": "edgar" } 
        
    ] 
}

 *This issue was discussed on the mailing list and finalized the above implementation. The current version of the JSON reader is capable of supporting this convention. 


Milestone 1 :  Mid Evaluation Dead Line

 *<code up-loading>

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@ws.apache.org
For additional commands, e-mail: general-help@ws.apache.org