diff options
author | Emmanuele Bassi <ebassi@openedhand.com> | 2007-10-01 15:50:49 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@openedhand.com> | 2007-10-01 15:50:49 +0100 |
commit | 9bdee4c01adef7e9d7ed18d5dd94671057f1459b (patch) | |
tree | 1830572bac48937a4f0f02845a8fc02b8c2782b9 | |
parent | 2e362edd46f11f2fd1fa327877372b902b70c280 (diff) | |
download | json-glib-9bdee4c01adef7e9d7ed18d5dd94671057f1459b.tar.gz |
Add API reference for JSON-GLib
Use gtk-doc to build the various bits and pieces of the API reference
for JSON-GLib.
-rw-r--r-- | doc/Makefile.am | 1 | ||||
-rw-r--r-- | doc/reference/Makefile.am | 2 | ||||
-rw-r--r-- | doc/reference/json-glib-docs.sgml | 153 | ||||
-rw-r--r-- | doc/reference/json-glib-sections.txt | 92 | ||||
-rw-r--r-- | doc/reference/json-glib.types | 1 | ||||
-rw-r--r-- | json-glib/json-node.c | 2 | ||||
-rw-r--r-- | json-glib/json-version.h.in | 8 |
7 files changed, 257 insertions, 2 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am index e69de29..f3ddc22 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = reference diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am index abb2c6f..46afe38 100644 --- a/doc/reference/Makefile.am +++ b/doc/reference/Makefile.am @@ -47,7 +47,7 @@ CFILE_GLOB=$(top_srcdir)/json-glib/*.c # Header files to ignore when scanning. # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h -IGNORE_HFILES=json-private.h +IGNORE_HFILES=json-private.h json-marshal.h json-glib.h stamp-json-marshal.h EXTRA_HFILES= diff --git a/doc/reference/json-glib-docs.sgml b/doc/reference/json-glib-docs.sgml index e69de29..5ffe455 100644 --- a/doc/reference/json-glib-docs.sgml +++ b/doc/reference/json-glib-docs.sgml @@ -0,0 +1,153 @@ +<?xml version="1.0"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ +<!ENTITY version SYSTEM "version.xml"> +]> + +<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude"> + <bookinfo> + <title>JSON-GLib &version; Reference Manual</title> + <releaseinfo>Version &version;</releaseinfo> + + <copyright> + <year>2007</year> + <holder>OpenedHand LTD</holder> + </copyright> + + <legalnotice> + <para> + Permission is granted to copy, distribute and/or modify this + document under the terms of the <citetitle>GNU Free + Documentation License</citetitle>, Version 1.1 or any later + version published by the Free Software Foundation with no + Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. You may obtain a copy of the <citetitle>GNU Free + Documentation License</citetitle> from the Free Software + Foundation by visiting <ulink type="http" + url="http://www.fsf.org">their Web site</ulink> or by writing + to: + + <address> + The Free Software Foundation, Inc., + <street>59 Temple Place</street> - Suite 330, + <city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode> +, + <country>USA</country> + </address> + </para> + </legalnotice> + + </bookinfo> + + <part id="json-glib"> + <title>JSON-GLib Overview</title> + + <partintro> + + <para> + JSON-GLib is a library aimed at providing an API for efficient parsing + and writing of JSON (JavaScript Object Notation) streams, using GLib's + data types and API. + </para> + + </partintro> + + </part> + + <part id="clutterbase"> + <title>JSON-GLib Reference</title> + + <partintro> + + <para> + JSON-GLib provides wrappers around the complex data types defined + by the JSON specification. The fundamental types are handled using + the Generic Value container (GValue) provided by GLib. + </para> + + <para> + JSON complex data types are either arrays (a n-tuple of items) + or objects (a mapping between a string and a value); arrays and + objects can contain multiple values, including other arrays and + objects. + </para> + + </partintro> + + <chapter> + <title>Data Types</title> + <xi:include href="xml/json-node.xml"/> + <xi:include href="xml/json-array.xml"/> + <xi:include href="xml/json-object.xml"/> + </chapter> + + </part> + + <part id="json-streams"> + <title>Reading and writing</title> + + <partintro> + + <para> + JSON-GLib provides a parser object to read any valid JSON data + stream and build the data object model in memory. + </para> + + </partintro> + + <chapter> + <title>Parser</title> + <xi:include href="xml/json-parser.xml"/> + </chapter> + + <chapter> + <title>Generator</title> + </chapter> + + </part> + + <part id="tools"> + <title>JSON-GLib Additional Reference</title> + + <xi:include href="xml/json-version.xml"/> + </part> + + <index> + <title>Index</title> + </index> + + <appendix id="license"> + <title>License</title> + + <para> + This library is free software; you can redistribute it and/or + modify it under the terms of the <citetitle>GNU Library General + Public License</citetitle> as published by the Free Software + Foundation; either version 2 of the License, or (at your option) + any later version. + </para> + + <para> + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + <citetitle>GNU Library General Public License</citetitle> for + more details. + </para> + + <para> + You may obtain a copy of the <citetitle>GNU Library General + Public License</citetitle> from the Free Software Foundation by + visiting <ulink type="http" url="http://www.fsf.org">their Web + site</ulink> or by writing to: + + <address> + Free Software Foundation, Inc. + <street>59 Temple Place</street> - Suite 330 + <city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode> + <country>USA</country> + </address> + </para> + </appendix> + +</book> diff --git a/doc/reference/json-glib-sections.txt b/doc/reference/json-glib-sections.txt new file mode 100644 index 0000000..2428156 --- /dev/null +++ b/doc/reference/json-glib-sections.txt @@ -0,0 +1,92 @@ +<SECTION> +<FILE>json-object</FILE> +<TITLE>JsonObject</TITLE> +JsonObject +json_object_ref +json_object_unref + +<SUBSECTION> +json_object_has_member +json_object_get_member +json_object_get_members +json_object_get_size + +<SUBSECTION Private> +JSON_TYPE_OBJECT +json_object_get_type +</SECTION> + +<SECTION> +<FILE>json-array</FILE> +<TITLE>JsonArray</TITLE> +JsonArray +json_array_ref +json_array_unref + +<SUBSECTION> +json_array_get_element +json_array_get_elements +json_array_get_length + +<SUBSECTION Private> +JSON_TYPE_ARRAY +json_array_get_type +</SECTION> + +<SECTION> +<FILE>json-node</FILE> +<TITLE>JsonNode</TITLE> +JsonNode +JsonNodeType +JSON_NODE_TYPE +json_node_get_array +json_node_get_object +json_node_get_value +json_node_get_parent +json_node_type_name +</SECTION> + +<SECTION> +<FILE>json-parser</FILE> +<TITLE>JsonParser</TITLE> +JsonParserError + +<SUBSECTION> +JsonParser +JsonParserClass +json_parser_new +json_parser_load_from_file +json_parser_load_from_data +json_parser_get_root + +<SUBSECTION Standard> +JSON_TYPE_PARSER +JSON_PARSER +JSON_IS_PARSER +JSON_PARSER_CLASS +JSON_IS_PARSER_CLASS +JSON_PARSER_ERROR +JSON_PARSER_GET_CLASS + +<SUBSECTION Private> +JsonTokenType +JsonParserPrivate +json_parser_get_type +json_parser_error_quark +</SECTION> + +<SECTION> +<FILE>json-version</FILE> +<TITLE>Versioning information</TITLE> +JSON_MAJOR_VERSION +JSON_MINOR_VERSION +JSON_MICRO_VERSION + +<SUBSECTION> +JSON_VERSION +JSON_VERSION_S +JSON_VERSION_HEX + +<SUBSECTION> +JSON_CHECK_VERSION +</SECTION> diff --git a/doc/reference/json-glib.types b/doc/reference/json-glib.types new file mode 100644 index 0000000..ea3335c --- /dev/null +++ b/doc/reference/json-glib.types @@ -0,0 +1 @@ +json_parser_get_type diff --git a/json-glib/json-node.c b/json-glib/json-node.c index 50d3df0..465357e 100644 --- a/json-glib/json-node.c +++ b/json-glib/json-node.c @@ -101,7 +101,7 @@ json_node_take_object (JsonNode *node, /** * json_node_get_object: - * @data: a #JsonNode + * @node: a #JsonNode * * Retrieves the #JsonObject stored inside a #JsonNode * diff --git a/json-glib/json-version.h.in b/json-glib/json-version.h.in index f2fefee..a5af6c1 100644 --- a/json-glib/json-version.h.in +++ b/json-glib/json-version.h.in @@ -2,6 +2,14 @@ #define __JSON_VERSION_H__ /** + * SECTION:json-version + * @short_description: JSON-GLib version checking + * + * JSON-GLib provides macros to check the version of the library + * at compile-time + */ + +/** * JSON_MAJOR_VERSION: * * Json major version component (e.g. 1 if %JSON_VERSION is 1.2.3) |