[libgdata] core: Handle ‘etag’ and ‘kin d’ members in JSON feeds
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] core: Handle ‘etag’ and ‘kin d’ members in JSON feeds
- Date: Sun, 21 Sep 2014 16:42:41 +0000 (UTC)
commit fe5a38c0b1d507bae84e41fa5014e91632f0fc25
Author: Philip Withnall <philip tecnocode co uk>
Date: Sun Sep 21 17:28:43 2014 +0100
core: Handle ‘etag’ and ‘kind’ members in JSON feeds
Set the GDataFeed:etag property and ignore the kind.
gdata/gdata-feed.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gdata/gdata-feed.c b/gdata/gdata-feed.c
index 55492fd..fb0e58f 100644
--- a/gdata/gdata-feed.c
+++ b/gdata/gdata-feed.c
@@ -624,6 +624,10 @@ parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GEr
json_reader_end_element (reader);
}
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "kind") == 0) {
+ /* Ignore. */
+ } else if (g_strcmp0 (json_reader_get_member_name (reader), "etag") == 0) {
+ GDATA_FEED (parsable)->priv->etag = g_strdup (json_reader_get_string_value (reader));
} else {
return GDATA_PARSABLE_CLASS (gdata_feed_parent_class)->parse_json (parsable, reader,
user_data, error);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]