Class: Chronicle::Serialization::JSONLDSerializer

Inherits:
Serializer
  • Object
show all
Defined in:
lib/chronicle/serialization/jsonld_serializer.rb

Constant Summary collapse

DEFAULT_CONTEXT =
'https://schema.chronicle.app/'.freeze

Instance Method Summary collapse

Methods inherited from Serializer

#initialize, serialize

Constructor Details

This class inherits a constructor from Chronicle::Serialization::Serializer

Instance Method Details

#serializable_hashObject



6
7
8
9
10
# File 'lib/chronicle/serialization/jsonld_serializer.rb', line 6

def serializable_hash
  {
    '@context': DEFAULT_CONTEXT
  }.merge(serialize_record(@record))
end