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

Breadcrumb

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

function Message::mergeFromJsonString

Parses a json string to protobuf message.

This function takes a string in the json wire format, matching the encoding output by serializeToJsonString(). See mergeFrom() for merging behavior, if the field is already set in the specified message.

Parameters

string $data Json protobuf data.:

bool $ignore_unknown:

Return value

null

Throws

\Exception Invalid data.

File

vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php, line 770

Class

Message
Parent class of all proto messages. Users should not instantiate this class or extend this class or its child classes by their own. See the comment of specific functions for more details.

Namespace

Google\Protobuf\Internal

Code

public function mergeFromJsonString($data, $ignore_unknown = false) {
    $input = new RawInputStream($data);
    $this->parseFromJsonStream($input, $ignore_unknown);
}

API Navigation

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