sdb_service 0.3.6 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +1,18 @@
|
|
1
1
|
require 'sdb_service/serializer'
|
2
|
-
|
2
|
+
|
3
|
+
unless defined? JSON
|
4
|
+
require 'json/pure'
|
5
|
+
end
|
3
6
|
|
4
7
|
module SdbService
|
5
8
|
class JsonSerializer < Serializer
|
6
9
|
|
7
10
|
def serialize_payload(payload)
|
8
|
-
payload.is_a?(String)
|
11
|
+
if payload.is_a?(String)
|
12
|
+
return payload
|
13
|
+
else
|
14
|
+
payload.respond_to?(:to_json) ? payload.to_json : JSON.dump(payload)
|
15
|
+
end
|
9
16
|
end
|
10
17
|
|
11
18
|
def deserialize_payload(payload)
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 9
|
9
|
+
version: 0.3.9
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Derek Perez
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-06-02 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|