static function validateJson(Context $context) { if ($context->getRequest()->getContent()) { $context->entity = json_decode($context->getRequest()->getContent()); return json_last_error(); } return false; }
private function buildVaryHeader(Context $context) { $vary = ['Accept' => $context->getMediaType()]; return implode(',', array_keys(array_filter($vary))); }