Sha256: 3da68ddc38b2a7892b1031e771b9b573108face69d8e9597142f98144a2141cf

Contents?: true

Size: 290 Bytes

Versions: 3

Compression:

Stored size: 290 Bytes

Contents

# frozen_string_literal: true

require "json"

module Wamp
  module Serializer
    # Add common API for serializer
    class JSON
      def self.encode(message)
        ::JSON.dump(message)
      end

      def self.decode(message)
        ::JSON.parse(message)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
xconn-0.1.2 lib/wamp/serializer/json.rb
xconn-0.1.1 lib/wamp/serializer/json.rb
xconn-0.1.0 lib/wamp/serializer/json.rb