+ abort "Argument specified for option '--#{resource_schema.to_sym}' is neither valid JSON nor an existing file: '#{resource_body}'"
+ end
+ elsif resource_body_is_readable_file
+ resource_body = resource_body_file.read()
+ begin
+ # we don't actually need the results of the parsing,
+ # just checking for the JSON::ParserError exception
+ JSON.parse resource_body
+ rescue JSON::ParserError => e
+ abort "Contents of file '#{resource_body_file.path}' is not valid JSON: #{e}"