JSON escaping

Convert between JSON source and an escaped string.

escaping example
Example input
{"id":123}
Example output
"{\"id\":123}"