Sha256: 056d0689dbbe8eba9326ef497cd424dfd8afc94b24378b2eab3907d951e47a57

Contents?: true

Size: 336 Bytes

Versions: 2

Compression:

Stored size: 336 Bytes

Contents

module Vedeu
  class JSONParser
    class << self
      def parse(json = '')
        new(json).parse
      end
    end

    def initialize(json = '')
      @json = json || ''
    end

    def parse
      Buffer::Composition.new(as_hash)
    end

    private

    attr_reader :json

    def as_hash
      Oj.load(json)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vedeu-0.0.25 lib/vedeu/support/json_parser.rb
vedeu-0.0.24 lib/vedeu/support/json_parser.rb