Sha256: a1c629b621790aad6ba39d2aea2d0a342736c2e84e8159a4abefeafbecab7d67

Contents?: true

Size: 581 Bytes

Versions: 102

Compression:

Stored size: 581 Bytes

Contents

# frozen_string_literal: true

require 'avm/eac_generic_base0/file_formats/base'

module Avm
  module EacWebappBase0
    module FileFormats
      class Json < ::Avm::EacGenericBase0::FileFormats::Base
        VALID_BASENAMES = %w[*.json].freeze
        VALID_TYPES = [].freeze

        def file_apply(file)
          ::File.write(file, ::JSON.pretty_generate(::JSON.parse(::File.read(file))))
        end

        def json_file?(file)
          ::JSON.parse(::File.read(file))
          true
        rescue JSON::ParserError
          false
        end
      end
    end
  end
end

Version data entries

102 entries across 102 versions & 2 rubygems

Version Path
eac_tools-0.57.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.56.1 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
avm-eac_webapp_base0-0.14.0 lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.56.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.55.7 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.55.6 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.55.5 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.55.4 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.55.3 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.55.2 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.55.1 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.55.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.54.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.53.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
avm-eac_webapp_base0-0.13.1 lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.52.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.51.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.50.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.49.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb
eac_tools-0.48.1 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/json.rb