Skip to content

Commit

Permalink
JSON.generateに渡すJSON::Stateのspaceオプションを@から に変えた
Browse files Browse the repository at this point in the history
  • Loading branch information
hanachin committed Feb 4, 2020
1 parent bcc5ac8 commit 0a7e8f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions refm/api/src/json/JSON
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ require "json"

JSON.generate([1, 2, { name: "tanaka", age: 19 }])
# => "[1,2,{\"name\":\"tanaka\",\"age\":19}]"
json_state = JSON::State.new(space: "@")
json_state = JSON::State.new(space: " ")
JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => "[1,2,{\"name\":@\"tanaka\",\"age\":@19}]"
# => "[1,2,{\"name\": \"tanaka\",\"age\": 19}]"
#@end

@see [[c:JSON::State]], [[m:JSON.#pretty_generate]]
Expand Down

0 comments on commit 0a7e8f6

Please sign in to comment.