formatted JSON api working