Add ResponseCreator method converter from single quote to double quotes
See original GitHub issueCurrently to return a success you need to skip double quotes:
.willReturn(success("{\"bookingId\":\"1\"}", "application/json"))
With small documents is ok but if it is bigger might annoying dealing with it. There are some workarounds like reading from file, but providing a method that allows you to use single quotes as double quotes might simplify things, so for example previous example could be written:
.willReturn(successWithSingleQuotes("{'bookingId':'1'}", "application/json"))
Which is quite better to read but also to write.
I’ll provide a PR.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:9 (9 by maintainers)
Top Results From Across the Web
python - Convert single-quoted string to double-quoted string
I want to check whether the given string is single- or double-quoted. If it is single quote I ...
Read more >Single Quote, Double Quote, and Backticks in MySQL Queries
Using Backticks, Double Quotes, and Single Quotes when querying a MySQL database can be boiled down to two basic points: Quotes (Single and...
Read more >When to Use Double or Single Quotes in JavaScript - W3docs
There is only one difference in the usage of single and double quotes, and it comes down to what quote character you need...
Read more >Add single/double quotes around text/numbers in Excel
The video offers a short tutorial on how to add single/double quotes around text/numbers in Excel.
Read more >Create a string in Python (single, double, triple quotes, str())
If its type has no __str()__ method defined, it returns the result of repr() . The following are some examples of typical types....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am going to update the doc and release this new feature tomorrow.
sure, I’ll do it on Monday, and yes after inspecting deeply the code I agree with you that doing the converter way is far better.