lib/jrjackson/jrjackson.rb in jrjackson-0.2.0 vs lib/jrjackson/jrjackson.rb in jrjackson-0.2.1

- old
+ new

@@ -1,20 +1,19 @@ unless RUBY_PLATFORM =~ /java/ puts "This library is only compatible with a java-based ruby environment like JRuby." exit 255 end -# require_relative "jars/jrjackson-1.2.1.jar" -require_relative "jars/jrjackson-1.2.2.jar" +require_relative "jars/jrjackson-1.2.3.jar" + require 'com/jrjackson/jr_jackson' module JrJackson module Json class << self TIME_REGEX = %r(\A(\d{4}-\d\d-\d\d|(\w{3}\s){2}\d\d)\s\d\d:\d\d:\d\d) def load(json_string, options = nil) - if json_string.is_a?(String) && json_string =~ TIME_REGEX return JrJackson::Raw.parse_raw("\"#{json_string}\"") end if options && !options.empty?