|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
Packit Service |
def718 |
<head>
|
|
Packit Service |
def718 |
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
Packit Service |
def718 |
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
Packit Service |
def718 |
<meta name="generator" content="Doxygen 1.8.8"/>
|
|
Packit Service |
def718 |
<title>json-c: json_object_iterator.h File Reference</title>
|
|
Packit Service |
def718 |
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
Packit Service |
def718 |
<script type="text/javascript" src="jquery.js"></script>
|
|
Packit Service |
def718 |
<script type="text/javascript" src="dynsections.js"></script>
|
|
Packit Service |
def718 |
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
Packit Service |
def718 |
</head>
|
|
Packit Service |
def718 |
<body>
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
json-c
|
|
Packit Service |
def718 |
0.13.1
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
Main Page
|
|
Packit Service |
def718 |
Related Pages
|
|
Packit Service |
def718 |
Data Structures
|
|
Packit Service |
def718 |
Files
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
File List
|
|
Packit Service |
def718 |
Globals
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
Data Structures |
|
|
Packit Service |
def718 |
Functions
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
json_object_iterator.h File Reference
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
An API for iterating over json_type_object objects, styled to be familiar to C++ programmers. Unlike json_object_object_foreach() and json_object_object_foreachC(), this avoids the need to expose json-c internals like lh_entry.
|
|
Packit Service |
def718 |
More...
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
Data Structures
|
|
Packit Service |
def718 |
struct json_object_iterator
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
Functions
|
|
Packit Service |
def718 |
struct json_object_iterator json_object_iter_init_default (void)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
struct json_object_iterator json_object_iter_begin (struct json_object *obj)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
struct json_object_iterator json_object_iter_end (const struct json_object *obj)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
void json_object_iter_next (struct json_object_iterator *iter)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
const char * json_object_iter_peek_name (const struct json_object_iterator *iter)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
struct json_object * json_object_iter_peek_value (const struct json_object_iterator *iter)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
json_bool json_object_iter_equal (const struct json_object_iterator *iter1, const struct json_object_iterator *iter2)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
Detailed Description
|
|
Packit Service |
def718 |
An API for iterating over json_type_object objects, styled to be familiar to C++ programmers. Unlike json_object_object_foreach() and json_object_object_foreachC(), this avoids the need to expose json-c internals like lh_entry.
|
|
Packit Service |
def718 |
Copyright (c) 2009-2012 Hewlett-Packard Development Company, L.P.
|
|
Packit Service |
def718 |
This library is free software; you can redistribute it and/or modify it under the terms of the MIT license. See COPYING for details.
|
|
Packit Service |
def718 |
API attributes:
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
Thread-safe: NO
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
Reentrant: NO
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
Function Documentation
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
struct json_object_iterator json_object_iter_begin
|
|
Packit Service |
def718 |
(
|
|
Packit Service |
def718 |
struct json_object *
|
|
Packit Service |
def718 |
obj)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
Retrieves an iterator to the first pair of the JSON Object.
|
|
Packit Service |
def718 |
- Warning
- Any modification of the underlying pair invalidates all iterators to that pair.
|
|
Packit Service |
def718 |
- Parameters
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
objJSON Object instance (MUST be of type json_object)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
- Returns
- json_object_iterator If the JSON Object has at least one pair, on return, the iterator refers to the first pair. If the JSON Object doesn't have any pairs, the returned iterator is equivalent to the "end" iterator for the same JSON Object instance.
|
|
Packit Service |
def718 |
1 struct json_object_iterator it;
|
|
Packit Service |
def718 |
2 struct json_object_iterator itEnd;
|
|
Packit Service |
def718 |
3 struct json_object* obj;
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
5 obj = json_tokener_parse("{'first':'george', 'age':100}");
|
|
Packit Service |
def718 |
6 it = json_object_iter_begin(obj);
|
|
Packit Service |
def718 |
7 itEnd = json_object_iter_end(obj);
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
9 while (!json_object_iter_equal(&it, &itEnd)) {
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
11 json_object_iter_peek_name(&it));
|
|
Packit Service |
def718 |
12 json_object_iter_next(&it);
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
struct json_object_iterator json_object_iter_end
|
|
Packit Service |
def718 |
(
|
|
Packit Service |
def718 |
const struct json_object *
|
|
Packit Service |
def718 |
obj)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
Retrieves the iterator that represents the position beyond the last pair of the given JSON Object instance.
|
|
Packit Service |
def718 |
- Warning
- Do NOT write code that assumes that the "end" iterator value is NULL, even if it is so in a particular instance of the implementation.
|
|
Packit Service |
def718 |
- Note
- The reason we do not (and MUST NOT) provide "json_object_iter_is_end(json_object_iterator* iter)" type of API is because it would limit the underlying representation of name/value containment (or force us to add additional, otherwise unnecessary, fields to the iterator structure). The "end" iterator and the equality test method, on the other hand, permit us to cleanly abstract pretty much any reasonable underlying representation without burdening the iterator structure with unnecessary data.
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
For performance reasons, memorize the "end" iterator prior to any loop.
|
|
Packit Service |
def718 |
- Parameters
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
objJSON Object instance (MUST be of type json_object)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
- Returns
- json_object_iterator On return, the iterator refers to the "end" of the Object instance's pairs (i.e., NOT the last pair, but "beyond the last
|
|
Packit Service |
def718 |
pair" value)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
json_bool json_object_iter_equal
|
|
Packit Service |
def718 |
(
|
|
Packit Service |
def718 |
const struct json_object_iterator *
|
|
Packit Service |
def718 |
iter1,
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
const struct json_object_iterator *
|
|
Packit Service |
def718 |
iter2
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
Tests two iterators for equality. Typically used to test for end of iteration by comparing an iterator to the corresponding "end" iterator (that was derived from the same JSON Object instance).
|
|
Packit Service |
def718 |
- Note
- The reason we do not (and MUST NOT) provide "json_object_iter_is_end(json_object_iterator* iter)" type of API is because it would limit the underlying representation of name/value containment (or force us to add additional, otherwise unnecessary, fields to the iterator structure). The equality test method, on the other hand, permits us to cleanly abstract pretty much any reasonable underlying representation.
|
|
Packit Service |
def718 |
- Parameters
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
iter1Pointer to first valid, non-NULL iterator
|
|
Packit Service |
def718 |
iter2POinter to second valid, non-NULL iterator
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
- Warning
- if a NULL iterator pointer or an uninitialized or invalid iterator, or iterators derived from different JSON Object instances are passed, bad things will happen!
|
|
Packit Service |
def718 |
- Returns
- json_bool non-zero if iterators are equal (i.e., both reference the same name/value pair or are both at "end"); zero if they are not equal.
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
struct json_object_iterator json_object_iter_init_default
|
|
Packit Service |
def718 |
(
|
|
Packit Service |
def718 |
void
|
|
Packit Service |
def718 |
)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
Initializes an iterator structure to a "default" value that is convenient for initializing an iterator variable to a default state (e.g., initialization list in a class' constructor).
|
|
Packit Service |
def718 |
1 struct json_object_iterator iter = json_object_iter_init_default();
|
|
Packit Service |
def718 |
2 MyClass() : iter_(json_object_iter_init_default())
|
|
Packit Service |
def718 |
- Note
- The initialized value doesn't reference any specific pair, is considered an invalid iterator, and MUST NOT be passed to any json-c API that expects a valid iterator.
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
User and internal code MUST NOT make any assumptions about and dependencies on the value of the "default" iterator value.
|
|
Packit Service |
def718 |
- Returns
- json_object_iterator
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
void json_object_iter_next
|
|
Packit Service |
def718 |
(
|
|
Packit Service |
def718 |
struct json_object_iterator *
|
|
Packit Service |
def718 |
iter)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
Returns an iterator to the next pair, if any
|
|
Packit Service |
def718 |
- Warning
- Any modification of the underlying pair invalidates all iterators to that pair.
|
|
Packit Service |
def718 |
- Parameters
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
iter[IN/OUT] Pointer to iterator that references a name/value pair; MUST be a valid, non-end iterator. WARNING: bad things will happen if invalid or "end" iterator is passed. Upon return will contain the reference to the next pair if there is one; if there are no more pairs, will contain the "end" iterator value, which may be compared against the return value of json_object_iter_end() for the same JSON Object instance.
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
const char* json_object_iter_peek_name
|
|
Packit Service |
def718 |
(
|
|
Packit Service |
def718 |
const struct json_object_iterator *
|
|
Packit Service |
def718 |
iter)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
Returns a const pointer to the name of the pair referenced by the given iterator.
|
|
Packit Service |
def718 |
- Parameters
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
iterpointer to iterator that references a name/value pair; MUST be a valid, non-end iterator.
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
- Warning
- bad things will happen if an invalid or "end" iterator is passed.
|
|
Packit Service |
def718 |
- Returns
- const char* Pointer to the name of the referenced name/value pair. The name memory belongs to the name/value pair, will be freed when the pair is deleted or modified, and MUST NOT be modified or freed by the user.
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
struct json_object* json_object_iter_peek_value
|
|
Packit Service |
def718 |
(
|
|
Packit Service |
def718 |
const struct json_object_iterator *
|
|
Packit Service |
def718 |
iter)
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
Returns a pointer to the json-c instance representing the value of the referenced name/value pair, without altering the instance's reference count.
|
|
Packit Service |
def718 |
- Parameters
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
iterpointer to iterator that references a name/value pair; MUST be a valid, non-end iterator.
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
- Warning
- bad things will happen if invalid or "end" iterator is passed.
|
|
Packit Service |
def718 |
- Returns
- struct json_object* Pointer to the json-c value instance of the referenced name/value pair; the value's reference count is not changed by this function: if you plan to hold on to this json-c node, take a look at json_object_get() and json_object_put(). IMPORTANT: json-c API represents the JSON Null value as a NULL json_object instance pointer.
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
<address class="footer"><small>
|
|
Packit Service |
def718 |
Generated on Mon Mar 5 2018 23:17:09 for json-c by
|
|
Packit Service |
def718 |
|
|
Packit Service |
def718 |
1.8.8
|
|
Packit Service |
def718 |
</small></address>
|
|
Packit Service |
def718 |
</body>
|
|
Packit Service |
def718 |
</html>
|