Module: Briard::Readers::DataciteJsonReader
- Included in:
- MetadataUtils
- Defined in:
- lib/briard/readers/datacite_json_reader.rb
Instance Method Summary collapse
Instance Method Details
#read_datacite_json(string: nil, **_options) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/briard/readers/datacite_json_reader.rb', line 6 def read_datacite_json(string: nil, **) errors = jsonlint(string) return { 'errors' => errors } if errors.present? string.present? ? Maremma.from_json(string).transform_keys!(&:underscore) : {} end |