this is the String I need to convert to a POJO for easy access in my GWT app:
{"title":"test","content":"test","id":1,"user":null,"hash":null,"created":1379569937945,"modified":1379569937945,"password":null,"views":0}
Looking at this answer: Parse json with gwt 2.0
It seems that its quite easy to do with Overlay types. However the sample there shows for example getting an ID:
public final native int getId() /*-{
return parseInt(this.u[0]);
}-*/;
Problem is that the JSON String that my GWT app might get the order of the fields might change. What could be done for this reason? I'm no Javascript expert but this code shows to get the ID it gets on the first field parsed: return parseInt(this.u[0]);
if I understand this correctly? Like in my case what if the ID field position in the JSON string varries.