best approach to pass hash type data in string form from Rails/Ruby to a C# app???

Hi,

I need to pass (via string content of a HTTP request/response body) name value pairs of data (like a hash) back from a Ruby on Rails server to a C# client.

Anyone happen to know offhand what would be the best format to do this in? Probably XML I would guess?

tks

greghauptmann wrote:

Hi,

I need to pass (via string content of a HTTP request/response body) name value pairs of data (like a hash) back from a Ruby on Rails server to a C# client.

Anyone happen to know offhand what would be the best format to do this in? Probably XML I would guess?

No, XML is a bit too heavy. I'd usually advise JSON or Yaml.

tks

--

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Best,

json rocks

do you know offhand then whether C# has a library to parse JSON or Yaml to C# variables?

JSON might be better suited for key=>value pairs… depends on your app i suppose. Also dont know about json support in C#, but it’s pretty much a web standard as far as i know…

http://www.json.org/ list at the bottom for languages

greghauptmann wrote:

do you know offhand then whether C# has a library to parse JSON or Yaml to C# variables?

No, but the JSON and (I think) Yaml websites list a number of libraries for various languages. There's almost certainly a JSON library at the very least.

Hi,

I need to pass (via string content of a HTTP request/response body)

name value pairs of data (like a hash) back from a Ruby on Rails

server to a C# client.

Anyone happen to know offhand what would be the best format to do this

in? Probably XML I would guess?

tks

I would recommend JSON and you can find out what’s available at json.org.

Good luck,

-Conrad