Class: DiasporaFederation::Parsers::RelayableJsonParser

Inherits:
JsonParser show all
Defined in:
lib/diaspora_federation/parsers/relayable_json_parser.rb

Overview

This is a parser of JSON serialized object, that is normally used for parsing data of relayables. Assumed format differs from the usual entity by additional “property_order” property which is used to compute signatures deterministically. Input JSON for this parser is expected to match “/definitions/relayable” subschema of the JSON schema at diaspora.github.io/diaspora_federation/schemas/federation_entities.json.

Instance Method Summary collapse

Methods inherited from BaseParser

#initialize

Constructor Details

This class inherits a constructor from DiasporaFederation::Parsers::BaseParser

Instance Method Details

#parse(json_hash) ⇒ Array[2]

Returns comprehensive data for an entity instantiation.

Returns:

  • (Array[2])

    comprehensive data for an entity instantiation

See Also:



14
15
16
# File 'lib/diaspora_federation/parsers/relayable_json_parser.rb', line 14

def parse(json_hash)
  super.push(json_hash["property_order"])
end