Sha256: 74f59f617b34bc970970cb6529137accd9bf8a8dfaa63f521be6f056c088f76b

Contents?: true

Size: 401 Bytes

Versions: 4

Compression:

Stored size: 401 Bytes

Contents

# lib/lutaml/model/json_adapter/multi_json.rb
require "multi_json"
require_relative "../json_adapter"

module Lutaml
  module Model
    module JsonAdapter
      class MultiJsonDocument < Document
        def self.parse(json)
          data = MultiJson.load(json)
          new(data)
        end

        def to_json(*args)
          MultiJson.dump(to_h, *args)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lutaml-model-0.3.1 lib/lutaml/model/json_adapter/multi_json.rb
lutaml-model-0.3.0 lib/lutaml/model/json_adapter/multi_json.rb
lutaml-model-0.2.1 lib/lutaml/model/json_adapter/multi_json.rb
lutaml-model-0.1.0 lib/lutaml/model/json_adapter/multi_json.rb