question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add ResponseCreator method converter from single quote to double quotes

See original GitHub issue

Currently 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
tommysitucommented, Jun 14, 2017

I am going to update the doc and release this new feature tomorrow.

1reaction
lordofthejarscommented, Jun 9, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found