Class: DiasporaFederation::Parsers::JsonParser
- Inherits:
-
BaseParser
- Object
- BaseParser
- DiasporaFederation::Parsers::JsonParser
- Defined in:
- lib/diaspora_federation/parsers/json_parser.rb
Overview
This is a parser of JSON serialized object. JSON object format is defined by JSON schema which is available at diaspora.github.io/diaspora_federation/schemas/federation_entities.json. TODO: We must publish the schema at a real URL
Direct Known Subclasses
Defined Under Namespace
Classes: DeserializationError
Instance Method Summary collapse
-
#parse(json_hash) ⇒ Array[1]
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[1]
Returns comprehensive data for an entity instantiation.
12 13 14 15 |
# File 'lib/diaspora_federation/parsers/json_parser.rb', line 12 def parse(json_hash) from_json_sanity_validation(json_hash) parse_entity_data(json_hash["entity_data"]) end |