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

Breadcrumb

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

function GPBJsonWire::serializeFieldToStream

1 call to GPBJsonWire::serializeFieldToStream()
Message::serializeFieldToJsonStream in vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php
@ignore

File

vendor/google/protobuf/src/Google/Protobuf/Internal/GPBJsonWire.php, line 15

Class

GPBJsonWire

Namespace

Google\Protobuf\Internal

Code

public static function serializeFieldToStream($value, $field, &$output, $has_field_name = true) {
    if ($has_field_name) {
        $output->writeRaw("\"", 1);
        $field_name = GPBJsonWire::formatFieldName($field);
        $output->writeRaw($field_name, strlen($field_name));
        $output->writeRaw("\":", 2);
    }
    return static::serializeFieldValueToStream($value, $field, $output, !$has_field_name);
}
RSS feed
Powered by Drupal