Thursday, March 28, 2013

"Complex" JSON Overlay

Hi all,

I try to use overlay type on this kind of JSON:

{"records": [{"names": {"John": ["50", "H", "US"], "Jack": ["40", "H", "EN"]}, "style": "TR"}]}

So, to get the value of "style", I do that and it works:

public final native String getStyle()
return this.records[0].style;
Now I want to get the values of "names". I do that and what I get is always null.

public final native String getNames(final int i)
return this.records[0].names[i];

Why? Is it the good way to get the names and their properties? (like ["50", "H", "US"])

Thank you in advance :)

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment