Sha256: 3a48fd225c93111f0c1fd476d7ceea2768b342f194243e1d03a3c220e16635df

Contents?: true

Size: 325 Bytes

Versions: 4

Compression:

Stored size: 325 Bytes

Contents

# frozen_string_literal: true


module Jekyll
  module Filters
    module Json
      # Converts an object to JSON
      #
      # @param [Any]
      # @return [String]
      def json(object)
        require 'json'

        JSON.dump object
      end
    end
  end
end

Liquid::Template.register_filter(Jekyll::Filters::Json)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sutty-liquid-0.2.1 lib/jekyll/filters/json.rb
sutty-liquid-0.2.0 lib/jekyll/filters/json.rb
sutty-liquid-0.1.1 lib/jekyll/filters/json.rb
sutty-liquid-0.1.0 lib/jekyll/filters/json.rb