diff options
author | Emmanuele Bassi <ebassi@linux.intel.com> | 2009-04-13 22:30:05 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@linux.intel.com> | 2009-04-13 22:31:43 +0100 |
commit | ca329a7d5c1185cdf15fb85891693eca30295de1 (patch) | |
tree | 8903451bfc40da31b611680a9418dcc1c7dcfa12 /json-glib/json-parser.c | |
parent | b28d5894060aac1239e23665f42be3946b5450e7 (diff) | |
download | json-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.c | 17 |
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 |