Changed stream to return JSON