summaryrefslogtreecommitdiff
path: root/json-glib/json-parser.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2009-04-13 22:30:05 +0100
committerEmmanuele Bassi <ebassi@linux.intel.com>2009-04-13 22:31:43 +0100
commitca329a7d5c1185cdf15fb85891693eca30295de1 (patch)
tree8903451bfc40da31b611680a9418dcc1c7dcfa12 /json-glib/json-parser.c
parentb28d5894060aac1239e23665f42be3946b5450e7 (diff)
downloadjson-glib-ca329a7d5c1185cdf15fb85891693eca30295de1.tar.gz
[docs] Show an example of assignment
Since I decided to rant about assignments in JSON definitions, I also need to show what an assignment looks like.
Diffstat (limited to 'json-glib/json-parser.c')
-rw-r--r--json-glib/json-parser.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/json-glib/json-parser.c b/json-glib/json-parser.c
index bde6527..46a05f5 100644
--- a/json-glib/json-parser.c
+++ b/json-glib/json-parser.c
@@ -1170,11 +1170,18 @@ json_parser_get_current_pos (JsonParser *parser)
* @parser: a #JsonParser
* @variable_name: return location for the variable name, or %NULL
*
- * A JSON data stream might sometimes contain an assignment, even though
- * it would technically constitute a violation of the RFC. #JsonParser
- * will ignore the left hand identifier and parse the right hand value
- * of the assignment. #JsonParser will record, though, the existence of the
- * assignment in the data stream and the variable name used.
+ * A JSON data stream might sometimes contain an assignment, like:
+ *
+ * |[
+ * var _json_data = { "member_name" : [ ...
+ * ]|
+ *
+ * even though it would technically constitute a violation of the RFC.
+ *
+ * #JsonParser will ignore the left hand identifier and parse the right
+ * hand value of the assignment. #JsonParser will record, though, the
+ * existence of the assignment in the data stream and the variable name
+ * used.
*
* Return value: %TRUE if there was an assignment, %FALSE otherwise. If
* @variable_name is not %NULL it will be set to the name of the variable