Add JSON response to search functionality

This provides a read only JSON endpoint for the machine queryable
interface.