title: gvariant parsing for a complex format
body: <p>In my application i will be getting a message over dbus which has to be parsed using gvariant functions. </p>
  
  <p>The format string is G_VARIANT_TYPE ("a(ysb((sss)(sss)))"</p>
  
  <p>A sample code to construct a gVariant is as below</p>
  
  <p>int ParseVariant (GVariant *value);</p>
  
  <pre><code>int main()
  {
  
  GVariantBuilder *builder;
  GVariant *value;
  
  
  builder = g_variant_builder_new (G_VARIANT_TYPE ("a(ysb((sss)(sss)))"));
  g_variant_builder_add (builder, "(ysb((sss)(sss)))", 'J', "Test1", TRUE, "Hn", "di", "hedfs", "dd", "dr", "hdf");
  g_variant_builder_add (builder, "(ysb((sss)(sss)))", 'J', "Test2", TRUE, "Hn", "di", "hedfs", "dd", "dr", "hdf");
  //g_variant_builder_add (builder, "(ysb((sss)(sss)))", 'J', "Test3", TRUE, "Hn", "di", "hedfs", "dd", "dr", "hdf");
  
  
  GVariant *result = g_variant_new ("((yu)ya(ysb((sss)(sss))))", 'R', 23, 'E', builder);
  
  g_variant_builder_unref (builder);
  ParseVariant (result);
  }
  </code></pre>
  
  <p>Am looking for a parser function (ParseVariant (result)) using which I can extract each element of the variant result. </p>
  
  <p>Any help on this is highly appreciated. </p>
  
  <p>Thanks in advance.</p>