escape.json 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. [{
  2. "given": {
  3. "foo.bar": "dot",
  4. "foo bar": "space",
  5. "foo\nbar": "newline",
  6. "foo\"bar": "doublequote",
  7. "c:\\\\windows\\path": "windows",
  8. "/unix/path": "unix",
  9. "\"\"\"": "threequotes",
  10. "bar": {"baz": "qux"}
  11. },
  12. "cases": [
  13. {
  14. "expression": "\"foo.bar\"",
  15. "result": "dot"
  16. },
  17. {
  18. "expression": "\"foo bar\"",
  19. "result": "space"
  20. },
  21. {
  22. "expression": "\"foo\\nbar\"",
  23. "result": "newline"
  24. },
  25. {
  26. "expression": "\"foo\\\"bar\"",
  27. "result": "doublequote"
  28. },
  29. {
  30. "expression": "\"c:\\\\\\\\windows\\\\path\"",
  31. "result": "windows"
  32. },
  33. {
  34. "expression": "\"/unix/path\"",
  35. "result": "unix"
  36. },
  37. {
  38. "expression": "\"\\\"\\\"\\\"\"",
  39. "result": "threequotes"
  40. },
  41. {
  42. "expression": "\"bar\".\"baz\"",
  43. "result": "qux"
  44. }
  45. ]
  46. }]