Class: DiasporaFederation::Parsers::RelayableJsonParser
- Inherits:
-
JsonParser
- Object
- BaseParser
- JsonParser
- DiasporaFederation::Parsers::RelayableJsonParser
- 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
-
#parse(json_hash) ⇒ Array[2]
Comprehensive data for an entity instantiation.
Methods inherited from BaseParser
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.
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 |