Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Test encoding symbol keys as strings

  • Loading branch information...
commit 4be991abca2a090901d96e1fc460c3492d292d93 1 parent 3b978a8
Joshua Peek josh authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 spec/multi_json_spec.rb
5 spec/multi_json_spec.rb
View
@@ -53,6 +53,11 @@ def self.encode(string)
MultiJson.decode(MultiJson.encode(example)).should == example
end
end
+
+ it 'should encode symbol keys as strings' do
+ encoded_json = MultiJson.encode({ :foo => { :bar => 'baz' } })
+ MultiJson.decode(encoded_json).should == { 'foo' => { 'bar' => 'baz' } }
+ end
end
describe '.decode' do
Please sign in to comment.
Something went wrong with that request. Please try again.