Sha256: 8441f59667169e0e659c0947cf181c1544b81b85547477da385d8c3b54c596a1

Contents?: true

Size: 371 Bytes

Versions: 6

Compression:

Stored size: 371 Bytes

Contents

require "multi_json"
require_relative "json_document"

module Lutaml
  module Model
    module JsonAdapter
      class MultiJsonAdapter < JsonDocument
        def self.parse(json, _options = {})
          data = MultiJson.load(json)
          new(data)
        end

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lutaml-model-0.5.3 lib/lutaml/model/json_adapter/multi_json_adapter.rb
lutaml-model-0.5.2 lib/lutaml/model/json_adapter/multi_json_adapter.rb
lutaml-model-0.5.1 lib/lutaml/model/json_adapter/multi_json_adapter.rb
lutaml-model-0.5.0 lib/lutaml/model/json_adapter/multi_json_adapter.rb
lutaml-model-0.4.0 lib/lutaml/model/json_adapter/multi_json_adapter.rb
lutaml-model-0.3.30 lib/lutaml/model/json_adapter/multi_json_adapter.rb