First pass at a generic robust JSON server