fixing JSON parsing bugs in unit tests that caused failures on ruby 1.9.3