0

I have been reading a bit on JSON and rails (I am new to both) and I am trying to understand why JSON is useful and how it is used. I know this is a fairly vague question however I would like to understand it's principal application and why it is preferred over other methods. I've watched and read numeral tutorials on how to use it, but haven't come across anything that explains the fundamentals as to why it is used. If any of you have specific links on JSON with rails and how the two interact and more importantly why it is used it would be very much appreciated. Cheers.

4

1 回答 1

4

为什么使用它?因为它是一种简单、普遍、易于解析的数据交换方式。

Rails 和 JSON 之间没有内在关系——它是它支持的一种正常格式,因为很多东西都可以使用JSON,比如 JS 库(例如 jQuery UI)。

于 2012-06-03T18:54:14.703 回答