Read data in JSON format

Hi,

I have some data stored in file in JSON format. I’d like to read these
data and store them into database in rail application. Is there any
plugin to perform this? or direct code?

Should I convert this data to csv or other format?

Thanks,

Ahmed

Ahmed A. wrote:

Hi,

I have some data stored in file in JSON format. I’d like to read these
data and store them into database in rail application. Is there any
plugin to perform this? or direct code?

ActiveSupport has some JSON stuff built in. Check the docs for
ActiveSupport::JSON.

Should I convert this data to csv or other format?

Either leave it in JSON or use YAML (which is almost a superset of
JSON).

Thanks,

Ahmed

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs