https://bz.apache.org/bugzilla/show_bug.cgi?id=64704

--- Comment #6 from Felix Schumacher <[email protected]> ---
I think this discussion is more appropriate held on the users mailing list.

In short:

* I haven't checked, whether Groovy and Java share the regex implementation,
but it seems quite logically to me.

* The Java Regex engine does not support interruption (out of the box). In your
case, you might be able to check for interruption yourself by replacing

  for (int i = 0; i <= responseBody.length(); i++) {

by

  for (int i = 0; i <= responseBody.length() && !Thread.interrupted(); i++) {

, or by using a char source, that checks for interruption.

* I still believe it to be brittle. For an JSON parser the two strings look the
same: '{"a":"b"}' and '{"a": "b"}' (look for spaces), or even the two strings
'{"a":1,"b":2}' and '{"b":2,"a":1}' (look for the order). Your "parser" would
miss on those things and report an error/miss the match. That is - in my
definition - brittle.

* Have a look at JMESPath, it might give you everything you want, or search for
JSON Schema validators.

* If you use a third party plugin, you place burden on me, as I have to install
the plugin manager (which I don't use normally) and install the plugin (which I
first have to look up). That is not a minimal test in my eyes.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to