diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /lib/gitlab/json.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'lib/gitlab/json.rb')
-rw-r--r-- | lib/gitlab/json.rb | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/gitlab/json.rb b/lib/gitlab/json.rb index f1370a40222..368b621bdfb 100644 --- a/lib/gitlab/json.rb +++ b/lib/gitlab/json.rb @@ -180,9 +180,6 @@ module Gitlab class GrapeFormatter # Convert an object to JSON. # - # This will default to the built-in Grape formatter if either :oj_json or :grape_gitlab_json - # flags are disabled. - # # The `env` param is ignored because it's not needed in either our formatter or Grape's, # but it is passed through for consistency. # @@ -194,11 +191,7 @@ module Gitlab def self.call(object, env = nil) return object.to_s if object.is_a?(PrecompiledJson) - if Feature.enabled?(:grape_gitlab_json, default_enabled: true) - Gitlab::Json.dump(object) - else - Grape::Formatter::Json.call(object, env) - end + Gitlab::Json.dump(object) end end @@ -248,8 +241,6 @@ module Gitlab # @return [String] # @raise [LimitExceeded] if the resulting json string is bigger than the specified limit def self.encode(object, limit: 25.megabytes) - return ::Gitlab::Json.dump(object) unless Feature.enabled?(:json_limited_encoder) - buffer = StringIO.new buffer_size = 0 |