Added JSON functionality