# Read data in JSON format

**URL:** <https://www.ruby-forum.com/t/read-data-in-json-format/194890>\
**Category:** Rails\
**Created:** [September 13, 2010, 10:12am UTC](https://www.ruby-forum.com/t/read-data-in-json-format/194890 "2010-09-13T10:12:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amabdelsalam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/958977/32.png) [@amabdelsalam](https://www.ruby-forum.com/u/amabdelsalam)\
**Post date:** [September 13, 2010, 10:12am UTC](https://www.ruby-forum.com/t/read-data-in-json-format/194890/1 "2010-09-13T10:12:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![amabdelsalam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/958977/32.png) [@amabdelsalam](https://www.ruby-forum.com/u/amabdelsalam)\
**Post date:** [September 13, 2010, 4:10pm UTC](https://www.ruby-forum.com/t/read-data-in-json-format/194890/2 "2010-09-13T16:10:37Z")

</div>

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](http://www.marnen.org)  
removed\_email\_address@domain.invalid
