 .../jsonapi_test_field_type.info.yml               |   5 +
 .../jsonapi_test_field_type.services.yml           |   6 ++
 .../src/Normalizer/StringNormalizer.php            |  24 +++++
 tests/src/Functional/ExternalNormalizersTest.php   | 108 +++++++++++++++++++++
 4 files changed, 143 insertions(+)

diff --git a/tests/modules/jsonapi_test_field_type/jsonapi_test_field_type.info.yml b/tests/modules/jsonapi_test_field_type/jsonapi_test_field_type.info.yml
new file mode 100644
index 0000000..6a73aee
--- /dev/null
+++ b/tests/modules/jsonapi_test_field_type/jsonapi_test_field_type.info.yml
@@ -0,0 +1,5 @@
+name: 'JSON API test format-agnostic @FieldType normalizers'
+type: module
+package: Testing
+version: VERSION
+core: 8.x
diff --git a/tests/modules/jsonapi_test_field_type/jsonapi_test_field_type.services.yml b/tests/modules/jsonapi_test_field_type/jsonapi_test_field_type.services.yml
new file mode 100644
index 0000000..ebb51ed
--- /dev/null
+++ b/tests/modules/jsonapi_test_field_type/jsonapi_test_field_type.services.yml
@@ -0,0 +1,6 @@
+services:
+  serializer.normalizer.string.jsonapi_test_field_type:
+    class: Drupal\jsonapi_test_field_type\Normalizer\StringNormalizer
+    tags:
+      # The priority must be higher than serialization.normalizer.field_item.
+      - { name: normalizer , priority: 1000 }
diff --git a/tests/modules/jsonapi_test_field_type/src/Normalizer/StringNormalizer.php b/tests/modules/jsonapi_test_field_type/src/Normalizer/StringNormalizer.php
new file mode 100644
index 0000000..59c8ee7
--- /dev/null
+++ b/tests/modules/jsonapi_test_field_type/src/Normalizer/StringNormalizer.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace Drupal\jsonapi_test_field_type\Normalizer;
+
+use Drupal\Core\Field\Plugin\Field\FieldType\StringItem;
+use Drupal\serialization\Normalizer\FieldItemNormalizer;
+
+class StringNormalizer extends FieldItemNormalizer {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected $supportedInterfaceOrClass = StringItem::class;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function normalize($object, $format = NULL, array $context = []) {
+    $data = parent::normalize($object, $format, $context);
+    $data['value'] = str_replace('super', 'NOT', $data['value']);
+    return $data;
+  }
+
+}
diff --git a/tests/src/Functional/ExternalNormalizersTest.php b/tests/src/Functional/ExternalNormalizersTest.php
new file mode 100644
index 0000000..8f15090
--- /dev/null
+++ b/tests/src/Functional/ExternalNormalizersTest.php
@@ -0,0 +1,108 @@
+<?php
+
+namespace Drupal\Tests\jsonapi\Functional;
+
+use Drupal\Component\Serialization\Json;
+use Drupal\Core\Url;
+use Drupal\entity_test\Entity\EntityTest;
+use Drupal\field\Entity\FieldConfig;
+use Drupal\field\Entity\FieldStorageConfig;
+use Drupal\Tests\BrowserTestBase;
+use Drupal\user\Entity\Role;
+use Drupal\user\RoleInterface;
+
+/**
+ * Asserts external normalizers are handled as expected by the JSON API module.
+ *
+ * @see jsonapi.normalizers
+ *
+ * @group jsonapi
+ */
+class ExternalNormalizersTest extends BrowserTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $modules = [
+    'jsonapi',
+    'entity_test',
+  ];
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setUp() {
+    parent::setUp();
+
+    // This test is not about access control at all, so allow anonymous users to
+    // view the test entities.
+    Role::load(RoleInterface::ANONYMOUS_ID)
+      ->grantPermission('view test entity')
+      ->save();
+
+    FieldStorageConfig::create([
+      'field_name' => 'field_test',
+      'type' => 'string',
+      'entity_type' => 'entity_test',
+    ])
+      ->save();
+    FieldConfig::create([
+      'field_name' => 'field_test',
+      'entity_type' => 'entity_test',
+      'bundle' => 'entity_test',
+    ])
+      ->save();
+
+    $this->entity = EntityTest::create([
+      'name' => 'Llama',
+      'type' => 'entity_test',
+      'field_test' => static::VALUE_ORIGINAL,
+    ]);
+    $this->entity->save();
+  }
+
+  /**
+   * Tests format-agnostic @FieldType-level normalizers
+   *
+   * @see jsonapi.normalizers
+   */
+  public function testFormatAgnosticFieldTypeNormalizers() {
+    $value = 'Llamas are super awesome!';
+
+    $entity_test = EntityTest::create([
+      'name' => 'Llama',
+      'type' => 'entity_test',
+      'field_test' => $value,
+    ]);
+    $entity_test->save();
+
+    // Asserts the entity contains the value we set.
+    $this->assertSame($value, $entity_test->field_test->value);
+
+    // Asserts normalizing the entity using core's 'serializer' service DOES
+    // yield the value we set.
+    $core_normalization = $this->container->get('serializer')->normalize($entity_test);
+    $this->assertSame('Llamas are super awesome!', $core_normalization['field_test'][0]['value']);
+
+    // Install test module that contains a high-priority alternative normalizer:
+    // \Drupal\jsonapi_test_field_type\Normalizer\StringNormalizer::normalize().
+    $this->container->get('module_installer')->install(['jsonapi_test_field_type']);
+    $this->rebuildContainer();
+
+    // Asserts normalizing the entity using core's 'serializer' service DOES NOT
+    // ANYMORE yield the value we set.
+    $core_normalization = $this->container->get('serializer')->normalize($entity_test);
+    $this->assertNotSame($value, $core_normalization['field_test'][0]['value']);
+    $this->assertSame('Llamas are NOT awesome!', $core_normalization['field_test'][0]['value']);
+
+    // Asserts that this does NOT affect the JSON API normalization.
+    // @todo Remove line below in favor of commented line in https://www.drupal.org/project/jsonapi/issues/2878463.
+    $url = Url::fromRoute('jsonapi.entity_test--entity_test.individual', ['entity_test'=> $entity_test->uuid()]);
+    /* $url = $this->entity->toUrl('jsonapi'); */
+    $client = $this->getSession()->getDriver()->getClient()->getClient();
+    $response = $client->request('GET', $url->setAbsolute(TRUE)->toString());
+    $document = Json::decode((string) $response->getBody());
+    $this->assertSame($value, $document['data']['attributes']['field_test']);
+  }
+
+}
