Added JSON API support