Class: IbmPowerHmc::JSONParser

Inherits:
Object
  • Object
show all
Defined in:
lib/ibm_power_hmc/schema/parser.rb

Overview

JSON parser for handling JSON responses.

Instance Method Summary collapse

Instance Method Details

#parse(body) ⇒ Object



252
253
254
255
# File 'lib/ibm_power_hmc/schema/parser.rb', line 252

def parse(body)
  return [] if body.nil? || body.strip.empty?
  JSON.parse(body)
end