Interesting point Kris ! <div>Not sure how we can provide a simple and robust solution that works for all the cases. Maybe as you said, we follow a convention, that the info is at the root and otherwise the developer could use a custom function (as we do for sending paging info) to consume lpaging metadata.</div>
<div>Seb</div><div> </div><div><br><div class="gmail_quote">On Tue, Jan 22, 2013 at 7:49 AM, Matthias Wessendorf <span dir="ltr">&lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Mon, Jan 21, 2013 at 10:23 PM, Kris Borchers &lt;<a href="mailto:kris.borchers@gmail.com">kris.borchers@gmail.com</a>&gt; wrote:<br>

&gt; [Reposting from GMail because Red Hat account is blocked again]<br>
&gt; Thinking more, we could probably just keep the defaults undefined, that way they only define if they need them, otherwise the root of the response is assumed which would probably work better since for example, Twitter encapsulates the data but the paging is at the root of the response.<br>

&gt;<br>
<br>
</div>Ah... ok, thanks for the example - I ran into that yesterday evening<br>
as well, when testing parsing of the TW info...<br>
<br>
Here is, I think, what you define &quot;result container&quot;<br>
{<br>
    &quot;next_page&quot;: &quot;some value..&quot;,<br>
    &quot;prev_page&quot;: &quot;moar value...&quot;,<br>
...<br>
more &#39;flat&#39; data....<br>
...<br>
}<br>
<br>
There is a flat JSON response, that has the desired values at the root<br>
level of the response.<br>
<br>
Yesterday, I was wondering if there are server that do a more<br>
structured (think Java/XML) response<br>
{<br>
    &quot;metadata&quot;: {<br>
        &quot;next_page&quot;: &quot;some value..&quot;,<br>
        &quot;prev_page&quot;: &quot;moar value...&quot;,<br>
                // other metadata....<br>
    },<br>
        /// more structured results...<br>
}<br>
<br>
So yeah... that does not work, right now...  But what happens if they<br>
have even a bit deeper nesting (you never know why...).... I am now<br>
just thinking XPath :) but I see your point, since I had that same<br>
thought yesterday, after parsing twitters bits.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
-M<br>
</font></span><div class="im HOEnZb"><br>
<br>
<br>
&gt; On Jan 21, 2013, at 3:19 PM, Kris Borchers &lt;<a href="mailto:kris@redhat.com">kris@redhat.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; I&#39;ve hit one small snag. If the paging metadata is returned in the body, it would probably be useful for the developer to be able to specify a &quot;paging container&quot; and/or a &quot;results container&quot; since each of those pieces of information would probably be encapsulated from the other in any sane server implementation. I would suggest something like metadataContainer and dataContainer with defaults of &quot;paging&quot; and &quot;data&quot; as defaults but I am totally flexible on those.<br>

&gt;&gt;<br>
&gt;&gt; Thoughts?<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; aerogear-dev mailing list<br>
&gt;&gt; <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; aerogear-dev mailing list<br>
&gt; <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br>
<br>
<br>
</div><div class="im HOEnZb">--<br>
Matthias Wessendorf<br>
<br>
blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</div></div></blockquote></div><br></div>