Class: Ougai::Serializers::JsonOj

Inherits:
Ougai::Serializer show all
Defined in:
lib/ougai/serializers/json_oj.rb

Constant Summary collapse

OJ_OPTIONS =
{ mode: :custom, time_format: :xmlschema,
use_as_json: true, use_to_hash: true, use_to_json: true }

Instance Method Summary collapse

Methods inherited from Ougai::Serializer

for_json

Instance Method Details

#serialize(data) ⇒ Object



10
11
12
# File 'lib/ougai/serializers/json_oj.rb', line 10

def serialize(data)
  Oj.dump(data, OJ_OPTIONS)
end