Sha256: 77f5fb1f3457e12d5716096047917d493cd175a739f4c177ff605071102c3680

Contents?: true

Size: 341 Bytes

Versions: 28

Compression:

Stored size: 341 Bytes

Contents

module Fog
  module JSON

    def self.sanitize(data)
      case data
      when Array
        data.map {|datum| sanitize(datum)}
      when Hash
        for key, value in data
          data[key] = sanitize(value)
        end
      when ::Time
        data.strftime("%Y-%m-%dT%H:%M:%SZ")
      else
        data
      end
    end

  end
end

Version data entries

28 entries across 28 versions & 7 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/core/json.rb
michiels-fog-1.3.1 lib/fog/core/json.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/core/json.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/core/json.rb
fog-1.3.1 lib/fog/core/json.rb
fog-1.3.0 lib/fog/core/json.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/core/json.rb
fog-1.2.0 lib/fog/core/json.rb
ktheory-fog-1.1.2 lib/fog/core/json.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/lib/fog/core/json.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/lib/fog/core/json.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/lib/fog/core/json.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/core/json.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/core/json.rb
fog-1.1.2 lib/fog/core/json.rb
fog_tractical-1.1.4 lib/fog/core/json.rb
fog_tractical-1.1.3 lib/fog/core/json.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/core/json.rb
fog-1.1.1 lib/fog/core/json.rb
fog-1.1.0 lib/fog/core/json.rb