Easily paste JSON
Issue #1597
resolved
If possible, I want to be able to paste JSON inside a pair of single quotes and have string concatenation and escaping other single quotes happen automatically. For example, I want to paste this:
{
"d": {
"__metadata": {
"id": "https://url:443/path('')",
"uri": "https://url:443/path('')",
"type": "type"
},
"DocNumber": "1",
"Site": "2",
"StorageLoc": "3",
"PostBlock": "",
"MessageType": "",
"Message": "",
}
}
And get something like this:
'{"d": { ' +
'"__metadata": {' +
'"id": "https://url:443/path(\'\')",' +
'"uri": "https://url:443/path(\'\')",' +
'"type": "type"' +
'},' +
'"DocNumber": "1",' +
'"Site": "2",' +
'"StorageLoc": "3",' +
'"PostBlock": "",' +
'"MessageType": "",' +
'"Message": "",' +
'}}'
Comments (7)
-
repo owner -
reporter Oh yes, that would be great. Thanks Scott!
-
repo owner This has been implemented and will be included in the next build.
-
reporter Wow, that’s really cool, I love to see when things comes to life like this. Thanks so much for your work!
-
reporter - changed status to resolved
Change will be implemented in next build.
-
repo owner - changed status to open
Moving back to open until the new build is posted shortly.
-
repo owner - changed status to resolved
Delivered in 2.1.2.1.
- Log in to comment
Thanks for logging. I think this could be generalized to any pasting anything into a string literal that's multi-line and/or contains single quotes that need to be escaped. I'll take a look at how this might be handled.