escaped_quote_value.json 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. [
  2. {
  3. "query": "device.family:\\\"",
  4. "result": [
  5. {"type": "spaces", "value": ""},
  6. {
  7. "type": "filter",
  8. "filter": "text",
  9. "negated": false,
  10. "key": {"type": "keySimple", "value": "device.family", "quoted": false},
  11. "operator": "",
  12. "value": {"type": "valueText", "value": "\\\"", "quoted": false}
  13. },
  14. {"type": "spaces", "value": ""}
  15. ]
  16. },
  17. {
  18. "query": "device.family:te\\\"st",
  19. "result": [
  20. {"type": "spaces", "value": ""},
  21. {
  22. "type": "filter",
  23. "filter": "text",
  24. "negated": false,
  25. "key": {"type": "keySimple", "value": "device.family", "quoted": false},
  26. "operator": "",
  27. "value": {"type": "valueText", "value": "te\\\"st", "quoted": false}
  28. },
  29. {"type": "spaces", "value": ""}
  30. ]
  31. },
  32. {
  33. "desc": "This is a weird case. I think this should be an error, but it doesn't seem trivial to rewrite the grammar to handle that.",
  34. "query": "url:\"te\"st",
  35. "result": [
  36. {"type": "spaces", "value": ""},
  37. {
  38. "type": "filter",
  39. "filter": "text",
  40. "negated": false,
  41. "key": {"type": "keySimple", "value": "url", "quoted": false},
  42. "operator": "",
  43. "value": {"type": "valueText", "value": "te", "quoted": true}
  44. },
  45. {"type": "spaces", "value": ""},
  46. {"type": "freeText", "value": "st", "quoted": false},
  47. {"type": "spaces", "value": ""}
  48. ]
  49. }
  50. ]