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


12
13
14
# File 'lib/diaspora_federation/parsers/relayable_json_parser.rb', line 12

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