Skip to content

Commit 9e7fc33

Browse files
committed
Clarified the comment for parsing a string or hash back to a tree object.
The `create_additions: true` option is **needed* for the parsing to work. See issue <#58>.
1 parent 6251c7e commit 9e7fc33

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

lib/tree/utils/json_converter.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
#
55
# Author:: Anupam Sengupta (anupamsg@gmail.com)
66
#
7-
# Time-stamp: <2022-06-20 22:16:46 anupam>
7+
# Time-stamp: <2023-12-27 12:46:07 anupam>
88
#
9-
# Copyright (C) 2012, 2013, 2014, 2015, 2022 Anupam Sengupta <anupamsg@gmail.com>
9+
# Copyright (C) 2012, 2013, 2014, 2015, 2022, 2023 Anupam Sengupta <anupamsg@gmail.com>
1010
#
1111
# All rights reserved.
1212
#
@@ -100,11 +100,14 @@ module ClassMethods
100100
# representation. Note that this method should *NOT* be called directly.
101101
# Instead, to convert the JSON hash back to a tree, do:
102102
#
103-
# tree = JSON.parse(the_json_hash)
103+
# tree = JSON.parse(the_json_hash, create_additions: true)
104104
#
105105
# This operation requires the {JSON gem}[http://flori.github.com/json/] to
106106
# be available, or else the operation fails with a warning message.
107107
#
108+
# Note the +create_additions: true+ option, which is *required* for
109+
# successfully parsing the string or hash.
110+
#
108111
# @author Dirk Breuer (http://github.com/railsbros-dirk)
109112
# @since 0.7.0
110113
#

0 commit comments

Comments
 (0)