Sergey Avseyev
added a comment - 17/Jul/12 5:04 PM It isn't bug here
Note what are you setting as document:
"{'karen': '400', 'dipti': '800', 'status':'init' }"
This is a String, so it will be encoded as JSON string.
If you'd like to store a JSON Object, you should use Ruby Hash:
{'karen' => '400', 'dipti' => '800', 'status' => 'init' }
I guess '400' and '800' shouldn't be specified as strings, therefore you might want to omit single quotes

Also note that quoting JSON with ' is actually not legal. It's supposed to be " . Some JSON parsers (particularly some Python libraries) are really lax about this, but what you have there isn't JSON. It's a semi-JSON like string.

Matt Ingenthron
added a comment - 18/Jul/12 3:01 AM Also note that quoting JSON with ' is actually not legal. It's supposed to be " . Some JSON parsers (particularly some Python libraries) are really lax about this, but what you have there isn't JSON. It's a semi-JSON like string.
See json.org