toString func generates valid json

    * toString func used to generate invalid json
Merge pull request #449 from ceocoder/generate_valid_json

toString func generates valid json