aboutsummaryrefslogtreecommitdiffhomepage
path: root/ruby/lib/google/protobuf
diff options
context:
space:
mode:
authorGravatar Erik Benoist <erik@reverb.com>2018-05-22 10:14:04 -0500
committerGravatar Paul Yang <TeBoring@users.noreply.github.com>2018-05-22 08:14:04 -0700
commita8e2359329cf9ca1d00720ff77957f6dd0c678ba (patch)
tree41a3c2df105591c3dca1690c6ec5f0236cb6f516 /ruby/lib/google/protobuf
parentdd2dc0f14f9e5dc4e8343cc5f78d5f0bddd8991c (diff)
Allows the json marshaller to be passed json marshal options (#4252)
Diffstat (limited to 'ruby/lib/google/protobuf')
-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