tzusman
tzusman

Reputation: 61

Sending data between ruby and objective-C

I'm trying to serialize data for sharing between Ruby and Objective-C. I would like to use something lightweight like YAML or JSON, but I would be curious to hear what would be the easiest implementation.

Thanks.

Upvotes: 0

Views: 157

Answers (3)

Lily Ballard
Lily Ballard

Reputation: 185671

I wrote a ruby extension for this very purpose, which allows ruby to read/write property lists. This requires no extra libraries on the obj-c side, and you can install the ruby library via rubygems.

Upvotes: 0

outis
outis

Reputation: 77400

If suitable, A Ruby/Objective-C bridge, such as RubyObjC or RubyCocoa, will obviate the need to serialize data.

Upvotes: 1

Jorge Israel Peña
Jorge Israel Peña

Reputation: 38576

If you choose to go with JSON, there's the json-framework for Objective-C which seems to be pretty mature and is used by well known applications such as Adium and Twitterfon.

Here is a neat and simple article which shows how to use it.

I also recommend ASIHTTPRequest for the server communication you will be doing. Makes things a lot neater and easier.

Upvotes: 1

Related Questions