Differences between revisions 2 and 3
Revision 2 as of 2007-07-13 09:30:56
Size: 3210
Editor: cache
Revision 3 as of 2009-09-20 22:48:22
Size: 3210
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

JSON Support Axis2C


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 th 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.


  • - 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 th 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.




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>

GSOC2007/JSON_Support_Axis2C/ProjectProgress (last edited 2009-09-20 22:48:22 by localhost)