You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by em...@gmail.com on 2011/11/21 19:42:59 UTC

[PATCH] CIMI: json serialization not using correct symbol

From: Tong Li <li...@us.ibm.com>

---
 server/lib/cimi/model/base.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/server/lib/cimi/model/base.rb b/server/lib/cimi/model/base.rb
index 7cc3f49..06d8f27 100644
--- a/server/lib/cimi/model/base.rb
+++ b/server/lib/cimi/model/base.rb
@@ -140,7 +140,7 @@ class CIMI::Model::Base
   end
 
   def self.to_json(model)
-    @schema.to_json(model)
+    JSON::unparse(@schema.to_json(model))
   end
 
   def self.to_xml(model)
-- 
1.7.4.1


Re: [PATCH] CIMI: json serialization not using correct symbol

Posted by Michal Fojtik <mf...@redhat.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ACK. pushed.

 -- Michal

email4tong@gmail.com wrote:
> From: Tong Li <li...@us.ibm.com>
> 
> --- server/lib/cimi/model/base.rb |    2 +- 1 files changed, 1
> insertions(+), 1 deletions(-)
> 
> diff --git a/server/lib/cimi/model/base.rb
> b/server/lib/cimi/model/base.rb index 7cc3f49..06d8f27 100644 ---
> a/server/lib/cimi/model/base.rb +++ b/server/lib/cimi/model/base.rb 
> @@ -140,7 +140,7 @@ class CIMI::Model::Base end
> 
> def self.to_json(model) -    @schema.to_json(model) +
> JSON::unparse(@schema.to_json(model)) end
> 
> def self.to_xml(model)

- -- 
- --
Michal Fojtik, mfojtik@redhat.com
Deltacloud API: http://deltacloud.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOy6PqAAoJEEnFpmY+LvFRJ3cH/3bW9rJjuAMq9e7WqdiW8Gvo
9+FkzDLG37GM8ByBjIyu5RHkIZgqA/7hUkpp/lo1SfRdW2ems7y5CWeZXBrAwfPr
3yx2iL1Ku2nP/Xq20hOo3xqNisrY+jikCMfyVw4qMSGHE05Rh717rabGQQ7hzvrd
5lCCnjl1LV2akgtdN7NP9Vq+wf9/C8lJYDU651W6nGUjSVAxeDaxfkMJNSQzRCB2
rnS1NlXcX7OXa3y6YGBqEXsFMFfT4vh8eNYKnxr3pUkXLfTsdN+8i85ImvYGPad8
XHs0OepSb3AxZX/oVWSGN+jyYETqZmM1UJDih1rFou3Iej4ZKuXrByH1AQTc7+k=
=H2Mi
-----END PGP SIGNATURE-----