aboutsummaryrefslogtreecommitdiffhomepage
path: root/ruby/lib/google/protobuf/message_exts.rb
diff options
context:
space:
mode:
authorGravatar Erik Benoist <erik@reverb.com>2018-05-22 10:14:04 -0500
committerGravatar Bo Yang <teboring@google.com>2018-05-25 13:03:30 -0700
commitc19fcee48f064c6a49d865374c3adb37daa3f0dd (patch)
tree257f081e01c5939666b55e90f7e2dd70a2795e7e /ruby/lib/google/protobuf/message_exts.rb
parent5289ee0c2139b691111037806f088e306a31ac70 (diff)
Allows the json marshaller to be passed json marshal options (#4252)
Diffstat (limited to 'ruby/lib/google/protobuf/message_exts.rb')
-rw-r--r--ruby/lib/google/protobuf/message_exts.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ruby/lib/google/protobuf/message_exts.rb b/ruby/lib/google/protobuf/message_exts.rb
index e10266ba..f432f89f 100644
--- a/ruby/lib/google/protobuf/message_exts.rb
+++ b/ruby/lib/google/protobuf/message_exts.rb
@@ -40,8 +40,8 @@ module Google
module ClassMethods
end
- def to_json
- self.class.encode_json(self)
+ def to_json(options = {})
+ self.class.encode_json(self, options)
end
def to_proto