新手问题 JSON.parse 什么时候需要设置 symbolize_names

weakish · December 25, 2014 · 1654 hits

我一般偏好开 symbolize_names 因为 hash 一般习惯用 symbol 而且由于 hash 有 { sym: val } 的写法,表面上比 { 'str' => val } 更像 js

不知道各自有什么适用场景?或者大家的偏好是什么?

No Reply at the moment.
You need to Sign in before reply, if you don't have an account, please Sign up first.