Skip to content

Commit

Permalink
Clarified the comment for parsing a string or hash back to a tree obj…
Browse files Browse the repository at this point in the history
…ect.

The `create_additions: true` option is **needed* for the parsing to work.

See issue <#58>.
  • Loading branch information
evolve75 committed Dec 27, 2023
1 parent 6251c7e commit 9e7fc33
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/tree/utils/json_converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#
# Author:: Anupam Sengupta ([email protected])
#
# Time-stamp: <2022-06-20 22:16:46 anupam>
# Time-stamp: <2023-12-27 12:46:07 anupam>
#
# Copyright (C) 2012, 2013, 2014, 2015, 2022 Anupam Sengupta <[email protected]>
# Copyright (C) 2012, 2013, 2014, 2015, 2022, 2023 Anupam Sengupta <[email protected]>
#
# All rights reserved.
#
Expand Down Expand Up @@ -100,11 +100,14 @@ module ClassMethods
# representation. Note that this method should *NOT* be called directly.
# Instead, to convert the JSON hash back to a tree, do:
#
# tree = JSON.parse(the_json_hash)
# tree = JSON.parse(the_json_hash, create_additions: true)
#
# This operation requires the {JSON gem}[http://flori.github.com/json/] to
# be available, or else the operation fails with a warning message.
#
# Note the +create_additions: true+ option, which is *required* for
# successfully parsing the string or hash.
#
# @author Dirk Breuer (http://github.com/railsbros-dirk)
# @since 0.7.0
#
Expand Down

0 comments on commit 9e7fc33

Please sign in to comment.