Class: Protojson::Codec::Binary

Inherits:
Object
  • Object
show all
Extended by:
CodecInterface
Defined in:
lib/protojson/codec/binary.rb

Class Method Summary collapse

Methods included from CodecInterface

decode, encode

Class Method Details

.decode(message, data) ⇒ Object



14
15
16
# File 'lib/protojson/codec/binary.rb', line 14

def decode(message, data)
  message.new.parse_from_string(data)
end

.encode(message) ⇒ Object



10
11
12
# File 'lib/protojson/codec/binary.rb', line 10

def encode(message)
  message.serialize_to_string
end