You are here

public static function Json::getFileExtension in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Component/Serialization/Json.php \Drupal\Component\Serialization\Json::getFileExtension()
  2. 10 core/lib/Drupal/Component/Serialization/Json.php \Drupal\Component\Serialization\Json::getFileExtension()

Gets the file extension for this serialization format.

Return value

string The file extension, without leading dot.

Overrides SerializationInterface::getFileExtension

File

core/lib/Drupal/Component/Serialization/Json.php, line 32

Class

Json
Default serialization for JSON.

Namespace

Drupal\Component\Serialization

Code

public static function getFileExtension() {
  return 'json';
}