Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sample code of JSON::State.new #1552

Open
wants to merge 4 commits into
base: master
from
Open
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Update refm/api/src/json/JSON__State

Co-Authored-By: Kazuhiro NISHIYAMA <znz@users.noreply.github.com>
  • Loading branch information
hanachin and znz committed Mar 17, 2020
commit ef328b52e2b696d447fe95d37329e53bc5e08bd5
@@ -39,7 +39,7 @@ JSON 形式の文字列を生成するための設定を保持しておくため
require "json"

json_state = JSON::State.new(indent: "\t")
json_state.class # JSON::Ext::Generator::State
json_state.class # => JSON::Ext::Generator::State
json_state.indent # => "\t"
#@end

@@ -173,4 +173,3 @@ JSON 形式の文字列中で JavaScript のオブジェクトを表す部分に
--- to_h -> Hash

自身をハッシュに変換します。

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.