Method: Pcli::ApiResponse#json

Defined in:
lib/pcli/api_response.rb

#jsonObject



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/pcli/api_response.rb', line 16

def json
  if @json.nil?
    begin
      @json = JSON.parse(body)
    rescue JSON::ParserError
      @json = false
    end
  end

  @json
end