first stop when validating any webservice json :)

http://www.jsonlint.com/

On Jul 11, 10:09 am, djd <[email protected]> wrote:
> I don't think that what you're showing there is a valid json array. It
> should be, you are also expecting it, but the array should have [ ]
> brackets surrounding it...
>
> So, the jsonformat.html file in which you're showing the data, you
> should have [ { "type":"asd", ... } , { "type":"asd", ... } ]
>
> On Jul 11, 12:22 pm, Ahmed Shoeib <[email protected]>
> wrote:
>
>
>
> > hi all ,
>
> > after i get the json fomat from the server i tried to use GWT Overlay
> > to get the values from The json
>
> > but after eval that return an array of object
> > each index hold the json format
>
> > after trying to get the values from it
>
> > in this function
>
> > private void DoWork(JsArray<Member_JSON> members) {
>
> >                 Window.alert(members.toString());
> >                 for (int i = 0; i < members.length(); i++) {
> >                         Window.alert(members.get(i).getEmail().toString());
>
> >                         
> > if(members.get(i).getEmail().equals(loginInfo.getEmailAddress())){
> >                                 
> > if(members.get(i).getType().equals("Admin")){
> >                                         AdminPanel admin = new 
> > AdminPanel(loginInfo.getEmailAddress(),
> > loginInfo.getLogoutUrl(), members);
> >                                         RootPanel.get().add(admin);
> >                                         break;
> >                                 }
> >                         }
> >                 }
>
> > the Window.Alert Show Me unDefined
>
> > the jsonScript Class
> > -----------------------------
>
> > package com.apphuset.eventbuddy.client;
>
> > import com.google.gwt.core.client.JavaScriptObject;
>
> > public class Member_JSON extends JavaScriptObject
> > {                              // [1]
> >   // Overlay types always have protected, zero argument constructors.
> >   protected Member_JSON()
> > {}                                              // [2]
>
> >   // JSNI methods to get stock data.
> >   public final native String getEmail() /*-{ return this.email; }-
> > */; // [3]
> >   public final native String getType() /*-{ return this.type; }-*/;
>
> > }
>
> > ----------------
>
> > the json format
> > ----------------------http://www.4shared.com/photo/xZvLBL2r/jsonformat.html
>
> > The Message
> > -------------------http://www.4shared.com/photo/h10Jln2n/Message.html
>
> > how To Solve This problem ???????????????
>
> > Thanks,
> > ahmed shoeib

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to