class_docstr: Serialize and deserialize JSON.
class_docstr_tok: ["Serialize","and","deserialize","JSON","."]
code: def deserialize_proto(
      self, serialized: bytes | str, proto: _Proto
  ) -> _Proto:
      if not isinstance(serialized, (bytes, str)):
          raise TypeError(
              f"Parameter 'serialized' must be bytes or str, but got type: {type(serialized)}"
          )
      if isinstance(serialized, bytes):
          serialized = serialized.decode(_ENCODING)
      assert isinstance(serialized, str)
      return google.protobuf.json_format.Parse(serialized, proto)
  
imports: from __future__ import annotations
  import warnings
  import typing
  from typing import Any, Collection, Optional, Protocol, TypeVar
  import google.protobuf.json_format
  import google.protobuf.message
  import google.protobuf.text_format
  import onnx
label_desc: Use image node_id 2 for calling the _JsonSerializer obj's underlying member method code with example usage: obj.deserialize_proto(serialized, proto) and returns: google