Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Vaadin and JSON

Jay Lee
1 decade ago Sep 02, 2010 11:53am
Matti Tahvonen
1 decade ago Sep 03, 2010 7:47am


You can ignore the UIDL in this problem. It is JSON indeed, but it is just used to communicate between Vaadin server and the the client side engine. If you need to communicate to remote service it doesn't help you a bit.

Doing this in completely on the server side is the Vaadin way of doing things and also real simple. Below is an example how to write our blog's RSS feed to sysout. It is easy to adapt to JSON too. You'll most likely want to download some of the various JSON libraries from http://www.json.org/ to help with parsing. Rest of the process is just some plain Vaadin development.

URL myservice = new URL("http://vaadin.com/blog/-/blogs/rss");
            InputStream openStream = myservice.openStream();
            BufferedReader bufferedReader = new BufferedReader(
                    new InputStreamReader(openStream));
            String line;
            while ((line = bufferedReader.readLine()) != null) {