I want the end result to look like this:
"{\"price\":2.00}"
Is this possible without gsubbing the json?
No good:
{price: 2.00}.to_json
=> "{\"price\":2.0}"
Also no good:
{price: '%.2f' % 2.00}.to_json
=> "{\"price\":\"2.00\"}"
I want the end result to look like this:
"{\"price\":2.00}"
Is this possible without gsubbing the json?
No good:
{price: 2.00}.to_json
=> "{\"price\":2.0}"
Also no good:
{price: '%.2f' % 2.00}.to_json
=> "{\"price\":\"2.00\"}"