function Attribute::jsonSerialize
Returns a representation of the object for use in JSON serialization.
Attributes
#[\ReturnTypeWillChange]
  Return value
string The safe string content.
File
- 
              core/
lib/ Drupal/ Core/ Template/ Attribute.php, line 377  
Class
- Attribute
 - Collects, sanitizes, and renders HTML attributes.
 
Namespace
Drupal\Core\TemplateCode
public function jsonSerialize() {
  return (string) $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.