2014년 4월 11일 금요일

[rails] as_json vs to_json

to_json => Returns a JSON string representing the model. Some configuration is available throughoptions.

모델을 표현하는 json string을 반환!

as_json => Returns a hash representing the model. Some configuration can be passed throughoptions.

model을 표현하는 hash를 반환!

댓글 없음:

댓글 쓰기