lib/submodules/ably-ruby/lib/ably/modules/model_common.rb in ably-rest-0.8.2 vs lib/submodules/ably-ruby/lib/ably/modules/model_common.rb in ably-rest-0.8.3
- old
+ new
@@ -20,10 +20,10 @@
hash == other.hash
end
# Return a JSON ready object from the underlying #hash using Ably naming conventions for keys
def as_json
- hash.as_json.dup
+ hash.as_json.reject { |key, val| val.nil? }
end
# Stringify the JSON representation of this object from the underlying #hash
def to_json(*args)
as_json.to_json(*args)