Reworking JSONEndpoint