Class: Ougai::Serializer

Inherits:
Object
  • Object
show all
Defined in:
lib/ougai/serializer.rb

Class Method Summary collapse

Class Method Details

.for_jsonObject



5
6
7
8
9
10
11
12
13
# File 'lib/ougai/serializer.rb', line 5

def self.for_json
  if RUBY_PLATFORM =~ /java/
    require 'ougai/serializers/json_jr_jackson'
    Serializers::JsonJrJackson.new
  else
    require 'ougai/serializers/json_oj'
    Serializers::JsonOj.new
  end
end