Ruby objects and JSON serialization (without Rails)

前端 未结 11 1980
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 03:32

I\'m trying to understand the JSON serialization landscape in Ruby. I\'m new to Ruby.

Is there any good JSON serialization options if you are not working with Rails?

11条回答
  •  天命终不由人
    2020-11-28 04:10

    To get the build in classes (like Array and Hash) to support as_json and to_json, you need to require 'json/add/core' (see the readme for details)

提交回复
热议问题