From: Linus Oleander on
As the title describe.
I need to pass some data from the server side to the browser.
But I cant figure out how to encode it on the server en decode using
Javascript.

Any ideas?
--
Posted via http://www.ruby-forum.com/.

From: Michael Fellinger on
[Note: parts of this message were removed to make it a legal post.]

JSON

On Jul 16, 2010 8:42 AM, "Linus Oleander" <linusoleander(a)gmail.com> wrote:

As the title describe.
I need to pass some data from the server side to the browser.
But I cant figure out how to encode it on the server en decode using
Javascript.

Any ideas?
--
Posted via http://www.ruby-forum.com/.

From: Linus Oleander on
Michael Fellinger wrote:
> JSON
>
> On Jul 16, 2010 8:42 AM, "Linus Oleander" <linusoleander(a)gmail.com>
> wrote:
>
> As the title describe.
> I need to pass some data from the server side to the browser.
> But I cant figure out how to encode it on the server en decode using
> Javascript.
>
> Any ideas?

I'm already using JSON to pass data to the client.
But as I wrote in my first post i need to decode a string on the server
site and decode it in the client.

I found a solution to the problem.

The unescape(); method on the client (JS)
And on the server I used URI::escape (Ruby)
--
Posted via http://www.ruby-forum.com/.