mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-06 03:58:49 +09:00
(cherry picked from commit ac86c6c28f)
This commit is contained in:
1 parent
0daf9f0f76
commit
dee4f8172c
1 file changed
+1
-2
@@ -47,8 +47,7 @@ module OpenNebulaJSON
|
||||
|
||||
def parse_json_sym(json_str, root_element)
|
||||
begin
|
||||
parser = JSON.parser.new(json_str, {:symbolize_names => true})
|
||||
hash = parser.parse
|
||||
hash = JSON.parse(json_str, {:symbolize_names => true})
|
||||
|
||||
if hash.has_key?(root_element)
|
||||
return hash[root_element]
|
||||
|
||||
Reference in new issue
Block a user