lib/amee/profile.rb in Floppy-amee-0.1.5 vs lib/amee/profile.rb in Floppy-amee-0.2.1

- old
+ new

@@ -4,10 +4,10 @@ def self.list(connection) # Load data from path response = connection.get('/profiles') # Parse data from response profiles = [] - if response.slice(0,1) == '{' + if response.is_json? # Read JSON doc = JSON.parse(response) doc['profiles'].each do |p| data = {} data[:uid] = p['uid'] \ No newline at end of file