Sha256: a0d7d31a7d58d851e05d523df8fc56ff5fbf76bced7d8d737e7ebf0a8bf15bfc

Contents?: true

Size: 723 Bytes

Versions: 3

Compression:

Stored size: 723 Bytes

Contents

# encoding: utf-8
# (c) 2011-2015 Martin Poljak (martin@poljak.cz)

$:.push("../../..")
#require "json-rpc-objects/serializer/marshal"
#JsonRpcObjects::default_serializer(JsonRpcObjects::Serializer::Marshal)

require "../request"
req = JsonRpcObjects::V10::Request::create(:alfa, [:beta], :id => 12345)
puts req.serialize

require "../response"
res = JsonRpcObjects::V10::Response::create(true, nil, :id => 12345)
puts res.serialize

require "../response"
res = JsonRpcObjects::V10::Response::create(nil, "some problem", :id => 12345)
puts res.serialize

require "../../request"
puts JsonRpcObjects::Request::parse(req.serialize).inspect
require "../../response"
puts JsonRpcObjects::Response::parse(res.serialize).inspect

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
json-rpc-objects-0.4.6 lib/json-rpc-objects/v10/tests/test.rb
json-rpc-objects-0.4.5 lib/json-rpc-objects/v10/tests/test.rb
json-rpc-objects-0.4.4 lib/json-rpc-objects/v10/tests/test.rb