Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MarkupTrait.php

function MarkupTrait::jsonSerialize

Returns a representation of the object for use in JSON serialization.

Return value

string The safe string content.

File

core/lib/Drupal/Component/Render/MarkupTrait.php, line 71

Class

MarkupTrait
Implements MarkupInterface and Countable for rendered objects.

Namespace

Drupal\Component\Render

Code

public function jsonSerialize() : string {
    return $this->__toString();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal