diff options
author | Keith Derrick <keith.derrick@palm.com> | 2012-04-23 15:34:44 -0700 |
---|---|---|
committer | Keith Derrick <keith.derrick@palm.com> | 2012-04-23 15:34:44 -0700 |
commit | ded667a6126f0a97146d2a4e88693a6e9bae191c (patch) | |
tree | 179ff9d8d8330e010bbf1ca2e0a831163773f7fc /json_object_iterator.c | |
parent | 178a4b059cee947832c6ff2c531876dba56851e9 (diff) | |
download | json-c-ded667a6126f0a97146d2a4e88693a6e9bae191c.tar.gz |
Clean up documentation and correct sample code
Diffstat (limited to 'json_object_iterator.c')
-rw-r--r-- | json_object_iterator.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/json_object_iterator.c b/json_object_iterator.c index b887eb2..7191b53 100644 --- a/json_object_iterator.c +++ b/json_object_iterator.c @@ -1,17 +1,17 @@ -/** +/** ******************************************************************************* -* @file cjson_object_iterator.c -* -* Copyright (c) 2009 Hewlett-Packard Development Company, L.P. +* @file json_object_iterator.c +* +* Copyright (c) 2009-2012 Hewlett-Packard Development Company, L.P. * * This library is free software; you can redistribute it and/or modify * it under the terms of the MIT license. See COPYING for details. * -* @brief cjson forces clients to use its private data +* @brief json-c forces clients to use its private data * structures for JSON Object iteration. This API * implementation corrects that by abstracting the -* private cjson details. -* +* private json-c details. +* ******************************************************************************* */ @@ -25,30 +25,30 @@ /** * How It Works - * - * For each JSON Object, cjson maintains a linked list of zero + * + * For each JSON Object, json-c maintains a linked list of zero * or more lh_entry (link-hash entry) structures inside the * Object's link-hash table (lh_table). - * + * * Each lh_entry structure on the JSON Object's linked list * represents a single name/value pair. The "next" field of the * last lh_entry in the list is set to NULL, which terminates * the list. - * + * * We represent a valid iterator that refers to an actual * name/value pair via a pointer to the pair's lh_entry * structure set as the iterator's opaque_ field. - * - * We follow cjson's current pair list representation by + * + * We follow json-c's current pair list representation by * representing a valid "end" iterator (one that refers past the * last pair) with a NULL value in the iterator's opaque_ field. - * + * * A JSON Object without any pairs in it will have the "head" * field of its lh_table structure set to NULL. For such an * object, json_object_iter_begin will return an iterator with * the opaque_ field set to NULL, which is equivalent to the * "end" iterator. - * + * * When iterating, we simply update the iterator's opaque_ field * to point to the next lh_entry structure in the linked list. * opaque_ will become NULL once we iterate past the last pair @@ -57,7 +57,7 @@ */ /// Our current representation of the "end" iterator; -/// +/// /// @note May not always be NULL static const void* kObjectEndIterValue = NULL; |