parse json to object ruby

后端 未结 5 451
囚心锁ツ
囚心锁ツ 2020-12-24 07:13

I looked into different resources and still get confused on how to parse a json format to a custom object, for example

class Resident
  attr_accessor :phone,         


        
5条回答
  •  南方客
    南方客 (楼主)
    2020-12-24 07:43

    We recently released a Ruby library static_struct that solves the issue. Check it out.

提交回复
热议问题