Re: json gwt

2010-12-23 Thread Petr Arsentev
Yes, I make configured for servlet JSONServlet com.trackstudio.JSONServlet JSONServlet /JSONServlet When I set this link in browser I get json objects On Dec 23, 6:39 am, zixzigma wrote: > have you configured your servlet in web.xml f

Re: json gwt

2010-12-22 Thread zixzigma
Have a look at these two GWT-REST Frameworks, RestyGWT https://github.com/chirino/resty-gwt http://restygwt.fusesource.org/documentation/index.html GWT-JSON-CommandPattern http://code.google.com/p/gwt-json-commandpattern/ -- You received this message because you are subscribed to the Google

Re: json gwt

2010-12-22 Thread Subhrajyoti Moitra
adding to the above. - Fix an UncaughtExceptioHandler to see if there are exceptions that are not being handled. - Use Gson to construct and deconstruct JSON in to POJO and vice versa. u can avoid the manual step in your servlet. - On the client use Javascript Overlay types to read the server

Re: json gwt

2010-12-22 Thread zixzigma
have you configured your servlet in web.xml file ? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+

json gwt

2010-12-22 Thread Petr Arsentev
Hi All. I create servlet, which create json object. [code] public class JSONServlet extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.print

Re: rest / json command pattern implementation project

2010-12-21 Thread zixzigma
Thank you Raphael, What a great project. can you please explain some of your stragies for implementing "caching" and "batching" ? some tips/high level overview of how you are going to design them ? Thank You -- You received this message because you are subscribed to the Google Groups "Google

Re: rest / json command pattern implementation project

2010-12-21 Thread Gal Dolber
Looks nice! I'll check it out On Tue, Dec 21, 2010 at 6:58 AM, Raphael André Bauer < raphael.andre.ba...@gmail.com> wrote: > On Tue, Dec 21, 2010 at 11:27 AM, Raphael André Bauer > wrote: > ... > > I am not sure if anybody is interested, but I released an alpha &g

Re: rest / json command pattern implementation project

2010-12-21 Thread Raphael André Bauer
On Tue, Dec 21, 2010 at 11:27 AM, Raphael André Bauer wrote: ... > I am not sure if anybody is interested, but I released an alpha > version of my rest (json) command pattern at google code. It is fully > functional, completed with testcases and can be built out of the box > using mav

rest / json command pattern implementation project

2010-12-21 Thread Raphael André Bauer
Hi, in many projects large scale GWT apps the command pattern comes in handy. It provides a central point for chaching, batching, retrying of flaky connections - and also functionality for undo operations. Great :) But what about Command pattern for REST interfaces (possibly using JSON)? There

Re: shared json-domain object on gwt

2010-12-12 Thread marius.andreiana
On Dec 13, 6:54 am, asianCoolz wrote: > how to share json-domain object on gwt client side and server side > objectify? any such example? possible to do this without dto/ > duplicated pojo? It is possible. The models at http://code.google.com/p/gwt-gae-book/wiki/St

shared json-domain object on gwt

2010-12-12 Thread asianCoolz
how to share json-domain object on gwt client side and server side objectify? any such example? possible to do this without dto/ duplicated pojo? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email

Re: Request factory: java.lang.NoClassDefFoundError: org/json/JSONException

2010-12-07 Thread Richard Berger
> > I am trying to run the dynatablerf example for request factory, and I > > get : > > > HTTP ERROR: 500org/json/JSONException > > RequestURI=/gwtRequestCaused by: > h3>java.lang.NoClassDefFoundError: org/json/JSONException > [...] > > Can you tell which

Re: Request factory: java.lang.NoClassDefFoundError: org/json/JSONException

2010-11-28 Thread Thomas Broyer
On 27 nov, 15:46, Simon Majou wrote: > Hello, > > I am trying to run the dynatablerf example for request factory, and I > get : > > HTTP ERROR: 500org/json/JSONException > RequestURI=/gwtRequestCaused by: h3>java.lang.NoClassDefFoundError: org/json/JSONException [...]

Request factory: java.lang.NoClassDefFoundError: org/json/JSONException

2010-11-27 Thread Simon Majou
Hello, I am trying to run the dynatablerf example for request factory, and I get : HTTP ERROR: 500org/json/JSONException RequestURI=/gwtRequestCaused by:java.lang.NoClassDefFoundError: org/json/JSONException at com.google.gwt.requestfactory.server.RequestFactoryServlet.doPost

Re: JSON+RequestBuilder vs RequestFactory

2010-11-17 Thread Thomas Broyer
On 17 nov, 08:59, zixzigma wrote: > Hello everyone. > > What are the benefits of using RequestFactory over JSON/Request > Builder. > > to implement client-side communication/persistence i have to options: > > 1- using Spring/Spring MVC on the server to handle all the s

JSON+RequestBuilder vs RequestFactory

2010-11-17 Thread zixzigma
Hello everyone. What are the benefits of using RequestFactory over JSON/Request Builder. to implement client-side communication/persistence i have to options: 1- using Spring/Spring MVC on the server to handle all the server-side work, and send JSON data to the GWT client. 2- i believe I still

Re: How to get list of objects from JSON ??

2010-10-27 Thread Thomas Broyer
ace declaring Integer getId() and String > getrLabel() for example). Then implement it on a "root" JSO that all your other JSOs will extend. If you were coding in JavaScript, no doubt you'd give the same names to the properties in the JS objects (or JSON objects if we think in term

Re: How to get list of objects from JSON ??

2010-10-27 Thread Sebastian Beigel
; DevMode but just "casts" it in prod mode (i.e. no single overhead once > compiled to JS). I used to do something similar. For dates and date-times as well (as these types are Strings in the JSON requests -- this works best for me at least). But I must admit, I'm lazy and I j

Re: How to get list of objects from JSON ??

2010-10-26 Thread Thomas Broyer
e readable than anything > > using com.google.gwt.json.* classes. > > I used to use overlay type heavily (returning JSON from a Spring > MVC/Jackson backend) and it worked quite well. Although I found it > quite limiting to be unable to model "real" class hierarchies (JSOs > m

Re: How to get list of objects from JSON ??

2010-10-26 Thread Subhrajyoti Moitra
Thanks Harald for reminding me. I actually used priti for some xml work. Not JSON. Yes, i think this also is a good alternative. Thanks, Subhro. On Wed, Oct 27, 2010 at 1:48 AM, Harald Pehl wrote: > Feel free to take a look at Piriti (http://code.google.com/p/piriti/). > It's a

Re: How to get list of objects from JSON ??

2010-10-26 Thread Harald Pehl
Feel free to take a look at Piriti (http://code.google.com/p/piriti/). It's a JSON / XML mapper for GWT using annotations and defered binding. Using Piriti you can have real POJOs on the client side. References and inheritance is supported. I'm about to release version 0.6 soon whic

Re: How to get list of objects from JSON ??

2010-10-26 Thread Subhrajyoti Moitra
"All this led me to write a Generator which inspects my models ("real" beans) and emits JSON mapping code handling simple properties, object graphs and collections."=> This is very interesting. Can u give some hints as how to go about writing this Generator? Thanks, Subhro

Re: How to get list of objects from JSON ??

2010-10-26 Thread Sebastian Beigel
e overlay type heavily (returning JSON from a Spring MVC/Jackson backend) and it worked quite well. Although I found it quite limiting to be unable to model "real" class hierarchies (JSOs must not be subclassed). I really do this a lot on the server side. I also really like to use the enhance

Re: How to get list of objects from JSON ??

2010-10-26 Thread Thomas Broyer
On 26 oct, 16:27, Jeff Schwartz wrote: > If the servlet is returning json then wouldn't just calling eval(jsonString) > in your client create the javascript objects? The servlet isn't "returning JSON", it's outputting a script to go right in the "dynamic HTM

Re: How to get list of objects from JSON ??

2010-10-26 Thread Thomas Broyer
On 26 oct, 15:38, Santosh kumar wrote: > Hi , > > Moitra and Thomas > > Thanks for your reply.. !! > > Anyways i got a solution.. > > *use this code in the servlet* --- > - get the list of products (productList) and use it in the servlet: > - This is JSON

Re: How to get list of objects from JSON ??

2010-10-26 Thread Jeff Schwartz
If the servlet is returning json then wouldn't just calling eval(jsonString) in your client create the javascript objects? On Tue, Oct 26, 2010 at 9:42 AM, Subhrajyoti Moitra wrote: > IMHO Overlay types are so much better than this round about solution. > > WHy cant your servl

Re: How to get list of objects from JSON ??

2010-10-26 Thread Subhrajyoti Moitra
IMHO Overlay types are so much better than this round about solution. WHy cant your servlet just output JSON data instead of some script? What you are doing manually, would have been done automatically if u used Overlay types. Anyways, good you were able to sort this problem out. Thanks

Re: How to get list of objects from JSON ??

2010-10-26 Thread Santosh kumar
Hi , Moitra and Thomas Thanks for your reply.. !! Anyways i got a solution.. *use this code in the servlet* --- - get the list of products (productList) and use it in the servlet: - This is JSON format to form a array of objects // Open the tag writer.append("<scr

Re: How to get list of objects from JSON ??

2010-10-23 Thread Subhrajyoti Moitra
http://googlewebtoolkit.blogspot.com/2008/08/getting-to-really-know-gwt-part-2.htm Use overlay types to read JSON arrays and objects. Thanks, Subhro. On Sat, Oct 23, 2010 at 11:08 AM, Santosh kumar wrote: > Hi, > > Using Dictionary in Gwt onModule load i want to get the list of objec

Re: How to get list of objects from JSON ??

2010-10-23 Thread Thomas Broyer
On 23 oct, 07:38, Santosh kumar wrote: > Hi, > > Using Dictionary in Gwt onModule load i want to get the list of objects from > Json  ??? > > http://code.google.com/webtoolkit/articles/dynamic_host_page.html > > The example in the above link it is shown for string, but

How to get list of objects from JSON ??

2010-10-22 Thread Santosh kumar
Hi, Using Dictionary in Gwt onModule load i want to get the list of objects from Json ??? http://code.google.com/webtoolkit/articles/dynamic_host_page.html The example in the above link it is shown for string, but i want to get the list of objects form the json ?? And also can you send me the

Re: Creating a JSON object in GWT

2010-10-21 Thread ep
XMLSerializer is for serializing into XML format... if you want to JSONize your object you can use overlay types in conjunction with com.google.gwt.json.client.JSONObject On 21 Okt., 09:49, Vibhuti Gupta wrote: > Hello > > I need to create a json object in GWT. I was trying to crea

Creating a JSON object in GWT

2010-10-21 Thread Vibhuti Gupta
Hello I need to create a json object in GWT. I was trying to create a JSON object using XMLSerializer but it does not work in GWT. Any ideas on this... Thanks -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this g

Re: RequestFactory + Rest/JSON?

2010-10-18 Thread Sripathi Krishnan
Forgot to add - I have been using the RequestBuilder + JSON + Javascript Overlays for quite a while now. We use sessions just for the authentication piece, but otherwise our setup is RESTful. You can go to a complete RESTful approach by - a) Using HTTP basic or digest authentication over HTTPS

Re: RequestFactory + Rest/JSON?

2010-10-18 Thread Sripathi Krishnan
> > I don't think any truly RESTful back end can be secure with a GWT front > end, because you need the back end to keep state to protect against XSRF. You don't need to maintain state to prevent CSRF. If you set a custom http request header and check its value on the server side, it will prevent

Re: RequestFactory + Rest/JSON?

2010-10-18 Thread Jeff Larsen
Oh that looks really interesting Johan. Consider it bookmarked. Another project I'm looking at is Restlet, but I just don't have enough time to do all the necessary investigation. As far as preventing XSRF with REST... that is definitely a tricky one but not something that is absolutely necessary

Re: RequestFactory + Rest/JSON?

2010-10-18 Thread Brett Thomas
Looks like an awesome project, but again security is the issue for me. I don't think any truly RESTful back end can be secure with a GWT front end, because you need the back end to keep state to protect against XSRF. That's why I thought RequestFactory had so much potential, if it could handle the

Re: RequestFactory + Rest/JSON?

2010-10-18 Thread Johan Rydberg
Have you guys looked at http://github.com/chirino/resty-gwt ? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-w

Re: RequestFactory + Rest/JSON?

2010-10-18 Thread Brett Thomas
with this issue? Thanks, Brett On Wed, Oct 13, 2010 at 9:53 PM, Steve Moyer wrote: > "Has it ever been?" ... > > I meant that you could pretty much do your REST/JSON with the > RequestBuilder as shipped in GWT 2.x. Prior versions needed extra > code around what was shi

Re: RequestFactory + Rest/JSON?

2010-10-13 Thread Steve Moyer
"Has it ever been?" ... I meant that you could pretty much do your REST/JSON with the RequestBuilder as shipped in GWT 2.x. Prior versions needed extra code around what was shipped. smoyer On Oct 13, 7:32 pm, Thomas Broyer wrote: > On 14 oct, 00:59, Steve Moyer wrote: > >

Re: RequestFactory + Rest/JSON?

2010-10-13 Thread Thomas Broyer
On 14 oct, 00:59, Steve Moyer wrote: > I've been using RequestBuilder to access REST/JSON services since GWT > version 1.7.0. [...] > Wow ... that was a bit long-winded, but I think it's safe to say that > REST/JSON with GWT is no longer the bleeding edge. Has it ever

Re: RequestFactory + Rest/JSON?

2010-10-13 Thread Steve Moyer
I've been using RequestBuilder to access REST/JSON services since GWT version 1.7.0. Back then, you had to extend RequestBuilder as it was limited to POST and GET (to be compatible with Apple's then non- compliance Safari browser). With both GWT 2.0.3 and GWT 2.0.4, I've b

Re: RequestFactory + Rest/JSON?

2010-10-13 Thread Jeff Larsen
ject to take up? > > > > On Wed, Oct 13, 2010 at 12:03 PM, Jeff Larsen wrote: > > I am beginning a new project and I was wondering what the options are > > for using JSON and REST as the protocol for using the RequestFactory. > > The framework I'm writing must

Re: RequestFactory + Rest/JSON?

2010-10-13 Thread Brett Thomas
worthwhile project to take up? On Wed, Oct 13, 2010 at 12:03 PM, Jeff Larsen wrote: > I am beginning a new project and I was wondering what the options are > for using JSON and REST as the protocol for using the RequestFactory. > The framework I'm writing must be portable across mul

RequestFactory + Rest/JSON?

2010-10-13 Thread Jeff Larsen
I am beginning a new project and I was wondering what the options are for using JSON and REST as the protocol for using the RequestFactory. The framework I'm writing must be portable across multiple types of backend environments, Java, C#, PHP etc. In reading the docs/Ctrl+F I didn't fi

Re: REQUEST BUILDER + JSON OBJECT + PHP SERVER SIDE LANGUAGE

2010-10-08 Thread Alessio unibs
Alessio unibs wrote: > > > Hi, i have problem by using gwt requestbuilder to make http request > > with json object in body messages. In the server side code, i use php, > > but when i try to access request's data, the $_POST variable is empty. >

Re: REQUEST BUILDER + JSON OBJECT + PHP SERVER SIDE LANGUAGE

2010-10-07 Thread Ketan Shah
try trasmettiJSON.setHeader("Content-Type","application/x-www-form- urlencoded"); On Oct 7, 1:58 am, Alessio unibs wrote: > Hi, i have problem by using gwt requestbuilder to make http request > with json object in body messages. In the server side code, i use php,

Re: REQUEST BUILDER + JSON OBJECT + PHP SERVER SIDE LANGUAGE

2010-10-07 Thread Thomas Broyer
    $jsonGenerale = $_POST; >         echo(count($jsonGenerale)); > ?> > > THANK YOU IN ADVANCE What you need is $HTTP_RAW_POST_DATA, not $_POST (it only works with "form data" in either multipart/form-data or application/x-www-form- urlencoded form, not wi

Re: REQUEST BUILDER + JSON OBJECT + PHP SERVER SIDE LANGUAGE

2010-10-07 Thread Alessio unibs
t; public void *setRequestData*(java.lang.String requestData) > > On Wed, Oct 6, 2010 at 1:58 PM, Alessio unibs wrote: > > Hi, i have problem by using gwt requestbuilder to make http request > > with json object in body messages. In the server side code, i use php, > > but wh

Re: REQUEST BUILDER + JSON OBJECT + PHP SERVER SIDE LANGUAGE

2010-10-06 Thread andy stevko
Did you try public void *setRequestData*(java.lang.String requestData) On Wed, Oct 6, 2010 at 1:58 PM, Alessio unibs wrote: > Hi, i have problem by using gwt requestbuilder to make http request > with json object in body messages. In the server side code, i use php, > but when

REQUEST BUILDER + JSON OBJECT + PHP SERVER SIDE LANGUAGE

2010-10-06 Thread Alessio unibs
Hi, i have problem by using gwt requestbuilder to make http request with json object in body messages. In the server side code, i use php, but when i try to access request's data, the $_POST variable is empty. I post the code below: String path = GWT.getHostPageBaseURL() + "JsonObjectRe

Re: JSON requests with authorization and cross-site

2010-10-05 Thread lineman78
est a server-side proxy is not really an option, so you are pretty much stuck with JSONP. On Oct 5, 2:18 pm, Wouter wrote: > Hi there, > im quite new to GWT and i can not figure this one out... > I want to do a JSON request to a server which would normally show me a > popup to fill i

JSON requests with authorization and cross-site

2010-10-05 Thread Wouter
Hi there, im quite new to GWT and i can not figure this one out... I want to do a JSON request to a server which would normally show me a popup to fill in my username and password. How can i access this with GWT? i tried the request builder and using setPassword and setUser but it doesnt work for

Re: Interested in GWT client-side JSON serialization and deserialization?

2010-09-24 Thread Harald Pehl
In case you’re interested: I’ve written another JSON mapper which also comes with XML support. Feel free to take a look at it: http://code.google.com/p/piriti/ - Harald On Sep 23, 6:19 pm, lineman78 wrote: > This is way too complex, just stick to overlay objects and the > json2.js l

Re: Interested in GWT client-side JSON serialization and deserialization?

2010-09-23 Thread lineman78
This is way too complex, just stick to overlay objects and the json2.js library(assuming you are targeting wrote: > If your interested in GWT client-side JSON serialization and > deserialization check out the below link > > http://flax.ie/flax-engine-gwt-client-side-json-serializa

Interested in GWT client-side JSON serialization and deserialization?

2010-09-23 Thread Ciarán
If your interested in GWT client-side JSON serialization and deserialization check out the below link http://flax.ie/flax-engine-gwt-client-side-json-serialization-and-deserialization/ -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit"

Re: Cross Site Requests for JSON : Invalid Label

2010-09-07 Thread lineman78
In other words you are using JSONP client code to hit a JSON service. Without more info I am assuming this is your problem. In order to make cross site requests using the method described on the page you referenced you service needs to output JSONP, that is wrapping the JSON with a call to the

Cross Site Requests for JSON : Invalid Label

2010-09-07 Thread kudos
I have followed the steps here: http://code.google.com/webtoolkit/doc/1.6/tutorial/Xsite.html to create a call to another server for JSON data. Firebug shows an "invalid label" error when i run the application. I had a search for solutions and all I could find was things ab

Re: Deserialization of the JSON to JAXB annotated JPA pojo's on the client side.

2010-08-06 Thread Harald Pehl
You can take a look at Piriti: http://code.google.com/p/piriti/. It's a XML / JSON mapper for GWT. Currently it uses its own annotations for mapping XML/JSON to fields. But in the next major release I will support JAXB annotations as well. - Harald On 6 Aug., 00:51, Marcin Misiewicz wrote:

Deserialization of the JSON to JAXB annotated JPA pojo's on the client side.

2010-08-05 Thread Marcin Misiewicz
Hi In my app I have JAX-RS webservices which are producing JSON response from JPA entities annotated by JAXB. I wonder is there any clever and automated way to deserialize JSON response back to JPA entities on the client side. I know that gwt comes with capabilities to manually deserialize json

Re: is there any json parser that can parse UTF-8 json text

2010-07-16 Thread Alex
md":"C", > >                         "qNum":19 > >                     }, > >                     { > >                         "cmdType":"G", > >                         "row":1, > >                         "col"

Re: is there any json parser that can parse UTF-8 json text

2010-07-16 Thread Thomas Broyer
quot;G", >                         "row":1, >                         "col":1, >                         "ans":"心", >                         "cmd":"C" >                     } > ] > > i need to parse that and get one of the

Re: is there any json parser that can parse UTF-8 json text

2010-07-16 Thread Alex
"cmd":"C", "qNum":19 }, { "cmdType":"G", "row":1, "col":1,

Re: is there any json parser that can parse UTF-8 json text

2010-07-16 Thread Jaroslav Záruba
oh sry, i meant printing to outputStream instead of writing On Fri, Jul 16, 2010 at 2:50 PM, Thomas Broyer wrote: > > > On 16 juil, 12:43, Jaroslav Záruba wrote: > > ...and my favorite one (because done couple of times) - don't write() > > character data, print() it > > Can you elaborate? > > S

Re: is there any json parser that can parse UTF-8 json text

2010-07-16 Thread Thomas Broyer
On 16 juil, 12:43, Jaroslav Záruba wrote: > ...and my favorite one (because done couple of times) - don't write() > character data, print() it Can you elaborate? Sun-JDK's PrintWriter#print() ultimately call #write() (which in turn delegates to write() of the wrapped Writer). The only differen

Re: is there any json parser that can parse UTF-8 json text

2010-07-16 Thread Jaroslav Záruba
...and my favorite one (because done couple of times) - don't write() character data, print() it On Fri, Jul 16, 2010 at 12:25 PM, Thomas Broyer wrote: > > > On 16 juil, 10:59, Alex wrote: > > yup im using the doGet method, but i need a parser to extract the json > &

Re: is there any json parser that can parse UTF-8 json text

2010-07-16 Thread Thomas Broyer
On 16 juil, 10:59, Alex wrote: > yup im using the doGet method, but i need a parser to extract the json > object out of the json array (string). something like > JSONObject jsonObj=Parser.parse(some json array string).get(some > integer); > String resData=jsonObj.toString();

Re: is there any json parser that can parse UTF-8 json text

2010-07-16 Thread Alex
yup im using the doGet method, but i need a parser to extract the json object out of the json array (string). something like JSONObject jsonObj=Parser.parse(some json array string).get(some integer); String resData=jsonObj.toString(); i just need some parser that can parse json that contains UTF

Re: is there any json parser that can parse UTF-8 json text

2010-07-15 Thread lineman78
/unmarshaling is handled under the covers by these things called providers. It is intended to be used with JAXB to write an XSD from which you generate POJOs with JAXB and Jersey serializes them to XML, but custom providers can also serialize to JSON or you can write custom message body writers for your own

Re: is there any json parser that can parse UTF-8 json text

2010-07-15 Thread Alex
for client side i have alwasy use com.google.gwt.json.client.JSONParser without any problem. its for my server side. im not trying to convert the json string into java class, but rather i just need to send the string representation of a json object that was extracted from a json array to client

Re: is there any json parser that can parse UTF-8 json text

2010-07-14 Thread Alex
gt; BufferedReader(reader)); > >                                System.out.println(jsonA.isJsonArray()); > >                                System.out.println(jsonA.toString()); > >                        } > >                }catch(IOException e){ > >                        e.pri

Re: is there any json parser that can parse UTF-8 json text

2010-07-14 Thread lineman78
I use overlay types via the javascript JSON.parse method for the client side, which is available in newer browsers and you need to include json2.js for older browsers(eval is also an alternative). For server side, I suggest using the Jersey project with a JSON context provider as shown here

Re: is there any json parser that can parse UTF-8 json text

2010-07-14 Thread Jaroslav Záruba
fferedReader(reader)); >System.out.println(jsonA.isJsonArray()); >System.out.println(jsonA.toString()); >} >}catch(IOException e){ >e.printStackTrace(); >} >} > > }

is there any json parser that can parse UTF-8 json text

2010-07-14 Thread Alex
intln(jsonA.toString()); } }catch(IOException e){ e.printStackTrace(); } } } the jar from json.org dun work too. so is there any json parser that can parse UTF-8 json text (japanese and chinese character in particular) -- You received this mes

Re: JSON Problem

2010-07-08 Thread hi...@hiramchirino.com
The easiest way by far is to use RestyGWT http://restygwt.fusesource.org/documentation/index.html With it, you just create GWT RPC style service interfaces to access restful JSON resources. For example, lets say you want to post some JSON to a URL of "/blog/ comments": { "

Re: JSON Problem

2010-07-07 Thread Ahmed Shoeib
ost method On Jul 7, 11:08 pm, Thomas Broyer wrote: > On 7 juil, 20:47, Ahmed Shoeib wrote: > > > > > hi , > > converting the java object to JSON Done using > > > SONObject json_obj = new JSONObject(); > > json_obj.put("Member_Email",new JSONString(sym

Re: JSON Problem

2010-07-07 Thread Thomas Broyer
On 7 juil, 20:47, Ahmed Shoeib wrote: > hi , > converting the java object to JSON Done using > > SONObject json_obj = new JSONObject(); > json_obj.put("Member_Email",new JSONString(symbol)); > json_obj.put("Member_type", new JSONString(type)); &

Re: JSON Problem

2010-07-07 Thread Ahmed Shoeib
hi , converting the java object to JSON Done using SONObject json_obj = new JSONObject(); json_obj.put("Member_Email",new JSONString(symbol)); json_obj.put("Member_type", new JSONString(type)); and send it using post method using

Re: JSON no cache data access

2010-07-06 Thread Jeroen Janssen
Hi, I was wondering in your GWT code, do you cleanup the script after processing the callback? If you look at: http://code.google.com/intl/nl-NL/webtoolkit/doc/latest/tutorial/Xsite.html there is some documentation with regards to "[5] Before the timeout function completes, it removes the new

JSON no cache data access

2010-07-06 Thread txciggy
Hi, In my GWT application, I am using JSON async callback mechanism (JSONP) to retrieve data from server side. Earlier I used cgi-bin perl scripts on server side to retrieve data and return http object back to the client (browser) via async callback function call. I figured that resource usage is

Re: JSON Problem

2010-07-06 Thread eggsy84
se to convert JSON into Objects. See here: http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsOverlay.html Also I have made a bit of a discussion on my blog here: http://eggsylife.co.uk/2010/04/22/gwt-2-jsonp-and-javascript-overlays-with-jsonprequestbuilder/ Hope this helps, Eggs

Re: JSON Problem

2010-07-06 Thread André Moraes
I don't think that the Gson project can be used as a GWT module. Looks like it is for pure java development, not GWT development. Take a look at: http://code.google.com/p/piriti/ <http://code.google.com/p/piriti/>This project is a GWT library that provide JSON and XML facilities. On

Re: JSON Problem

2010-07-06 Thread Ahmed Shoeib
t; Throwable exception) { >                                         // error on the resquest >                                 } >                         }); > > On 5 jul, 15:01, Ahmed Shoeib wrote: > > > you told me how to send request from client to server > > > now i want how yo get data

Re: need help on JSON request and response on UI only

2010-07-05 Thread Blessed Geek
On the server-side, I use com.google.gson.* On the client-side, I use com.google.gwt.core.client.JavaScriptObject; com.google.gwt.json.client.*; There are two modes to using these APIs. - Use GWT RPC to send Java structures back and forth. In this mode, you are blind to JSON and never need to

Re: need help on JSON request and response on UI only

2010-07-05 Thread Thomas Broyer
On 5 juil, 17:09, sathya wrote: > I have a server model where, if we send JSON request, server replays > back with JSON response. Now I need to develop UI part for this > project using GWT (no need to develop server side as it has been > already developed).Can you please suggest m

Re: JSON Problem

2010-07-05 Thread Ahmed Shoeib
Ahmed Shoeib wrote: > > > you told me how to send request from client to server > > > now i want how yo get data from server to use it in client > > > and the data in json > > > On Jul 5, 8:12 pm, André Moraes wrote: > > > > This code is quite si

Re: JSON Problem

2010-07-05 Thread André Moraes
} }); On 5 jul, 15:01, Ahmed Shoeib wrote: > you told me how to send request from client to server > > now i want how yo get data from server to use it in client > > and the data in json > > On Jul 5, 8:12 pm, André Moraes wrote: > > > > > This

Re: JSON Problem

2010-07-05 Thread Ahmed Shoeib
you told me how to send request from client to server now i want how yo get data from server to use it in client and the data in json On Jul 5, 8:12 pm, André Moraes wrote: > This code is quite simple > > The line: > >  re = rb.sendRequest("jsonrpc-call=" + JsonHelper

Re: JSON Problem

2010-07-05 Thread André Moraes
This code is quite simple The line: re = rb.sendRequest("jsonrpc-call=" + JsonHelper.jsoToString(call), new RequestCallback() prepare a AJAX call to the server and make your javascript object to a string using JsonHelper.jsoToString. In ther server the json-string will be accessi

Re: JSON Problem

2010-07-05 Thread Ahmed Shoeib
JavaScriptObject _stringToJsoEval(String > string) /*-{ >                 return eval("(" + string + ")"); >         }-*/; > >         public static native boolean isJsonLibraryDefined() /*-{ >                 return typeof(JSON) != 'undefined' >                        

Re: JSON Problem

2010-07-05 Thread André Moraes
}-*/; public static native boolean isJsonLibraryDefined() /*-{ return typeof(JSON) != 'undefined' && typeof(JSON.parse) != 'undefined' && typeof(JSON.stringify) != 'undefined

need help on JSON request and response on UI only

2010-07-05 Thread sathya
I have a server model where, if we send JSON request, server replays back with JSON response. Now I need to develop UI part for this project using GWT (no need to develop server side as it has been already developed).Can you please suggest me how I send and receive JSON data from GWT front end. To

JSON Problem

2010-07-05 Thread Ahmed Shoeib
Dear Friends , i face a problem when trying to send and receive json object between client and server in GWT application so i want a simple example that show me how to do this Thanks, ahmed shoeib -- You received this message because you are subscribed to the Google Groups "Googl

Working with Date using JSON - pt_BR

2010-06-28 Thread André Moraes
Hi, Is possible to convert a javascript Date object to a java.util.Date (and vice-versa)? Like the string or int? The Date.parse is marked as deprecated in the JDK, it's safe to use it within the GWT, and what is the behavior (localization) that it will show. My primary target is Brazilian local

Re: Best way to Deserialize JSON String to Java Object

2010-06-19 Thread Chris Boertien
done for you when GWT creates the MyServiceAsync class which you define the interface for, and within the RemoteServiceServlet which your Servlet extends. I think it would be a worthwhile experiment to see if and how much of a difference there is between using GWT-RPC and using JSON with Overlay

Re: Best way to Deserialize JSON String to Java Object

2010-06-19 Thread Jose Luis Estrella Campaña
ote: > This is not totally true, gwt-rpc is OK for most data transfers, but > it causes a bit of overhead in deserialization. GWT's client side JSON > library is SLOW, > it constructs a parallel data structure of concrete types on parse, > upfront, and by default uses eval('&#x

Re: Best way to Deserialize JSON String to Java Object

2010-06-19 Thread Dean S. Jones
This is not totally true, gwt-rpc is OK for most data transfers, but it causes a bit of overhead in deserialization. GWT's client side JSON library is SLOW, it constructs a parallel data structure of concrete types on parse, upfront, and by default uses eval('''), which isn&

Re: Best way to Deserialize JSON String to Java Object

2010-06-18 Thread Gal Dolber
Sure, there is no doubt that the best way to go its the gwt-rpc 2010/6/18 Chris Boertien > All good points, but I think you guys are totally missing the point. > He was taking a POJO and converting it to JSON for transmission using > GWT-RPC, which is completely redundant since GW

Re: Best way to Deserialize JSON String to Java Object

2010-06-18 Thread Chris Boertien
All good points, but I think you guys are totally missing the point. He was taking a POJO and converting it to JSON for transmission using GWT-RPC, which is completely redundant since GWT-RPC can simply send the POJO and handle all the messy bits for him. Simple is better... On Fri, Jun 18, 2010

Re: Best way to Deserialize JSON String to Java Object

2010-06-18 Thread Gal Dolber
I think the best you can do is a generator that creates an overlay for that pojo and a utility class to convert a json string to the pojo. The interface will look like this: public interface Json2Pojo { POJO fromJson(String json); } And the steps will be: 1. Create an POJOOverlay from the

<    1   2   3   4   5   6   7   >