support jsonify filter

This commit is contained in:
liufengyun
2013-10-22 18:04:32 +08:00
parent 58ae8bc0cd
commit f971aebfb1
3 changed files with 32 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
require 'uri'
require 'json'
module Jekyll
module Filters
@@ -148,6 +149,15 @@ module Jekyll
end
end
# Convert the input into json string
#
# input - The Array or Hash to be converted
#
# Returns the converted json string
def jsonify(input)
input.to_json
end
private
def time(input)
case input