summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2013-06-13 18:14:38 +0000
committerMatthew Jordan <mjordan@digium.com>2013-06-13 18:14:38 +0000
commit1cb25deeba899dc1e4a2c51ba5934cc258b5c91f (patch)
tree5c86a79a47d397fdcbf9f64fcca3b39fb81044d8 /include
parentb51b437bf3d47111451117dc0a04faa6356ba30c (diff)
Blow away usage of libjansson's foreach macro
While very handy, this macro didn't occur until a later version of libjansson. We'd prefer to be compatible with older versions still - as such, iteration over key/value pairs in a JSON object have to be done with a little bit more manual work. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/json.h26
1 files changed, 0 insertions, 26 deletions
diff --git a/include/asterisk/json.h b/include/asterisk/json.h
index baf8cf6a2..43b4b5cf5 100644
--- a/include/asterisk/json.h
+++ b/include/asterisk/json.h
@@ -604,15 +604,6 @@ struct ast_json_iter *ast_json_object_iter_next(struct ast_json *object, struct
const char *ast_json_object_iter_key(struct ast_json_iter *iter);
/*!
- * \brief Retrieve the iterator object for a particular key
- * \since 12.0.0
- *
- * \param key Key of the field the \c ast_json_iter points to
- * \return \ref ast_json_iter object that points to \a key
- */
-struct ast_json_iter *ast_json_object_key_to_iter(const char *key);
-
-/*!
* \brief Get the value from an iterator.
* \since 12.0.0
*
@@ -639,23 +630,6 @@ struct ast_json *ast_json_object_iter_value(struct ast_json_iter *iter);
*/
int ast_json_object_iter_set(struct ast_json *object, struct ast_json_iter *iter, struct ast_json *value);
-/*!
- * \brief Iterate over key/value pairs
- *
- * \note This is a reproduction of the jansson library's \ref json_object_foreach
- * using the equivalent ast_* wrapper functions. This creates a for loop using the various
- * iteration function calls.
- *
- * \param object The \ref ast_json object that contains key/value tuples to iterate over
- * \param key A \c const char pointer key for the key/value tuple
- * \param value A \ref ast_json object for the key/value tuple
- */
-#define ast_json_object_foreach(object, key, value) \
- for (key = ast_json_object_iter_key(ast_json_object_iter(object)); \
- key && (value = ast_json_object_iter_value(ast_json_object_key_to_iter(key))); \
- key = ast_json_object_iter_key(ast_json_object_iter_next(object, ast_json_object_key_to_iter(key))))
-
-
/*!@}*/
/*!@{*/