Ruby 3.1 リファレンスマニュアル > ライブラリ一覧 > jsonライブラリ > JSON::Stateクラス > []=
self[name] = value
Set the attribute name to value.