Tim Vahlbrock
11/13/2024, 3:26 PM.{0,255}
(any character, 0-255 symbols). Pact JVM generates an (in my opinion valid) example value of "\u96A1\uD8A4". Pact JVM and the tested code are absolutely fine with this, but when trying to upload the contract file, the Pact CLI throws the following error.
/usr/lib/ruby/gems/3.3.0/gems/json-2.7.3/lib/json/common.rb222in `parse': incomplete surrogate pair at '\uD8A4", (JSON::ParserError)I assume the ruby json parser assumes, that the unicode surrogate should be followed by a fitting other surrogate. This is a bug right?
Yousaf Nabi (pactflow.io)
Tim Vahlbrock
11/14/2024, 7:01 AMTim Vahlbrock
11/14/2024, 7:04 AMTim Vahlbrock
11/14/2024, 7:34 AMBut when I inspect the file myselft it is absolutely fine.Copy code{ "errors": { "contracts": [ "content could not be parsed as application/json (at index 0)" ] } }
Tim Vahlbrock
11/14/2024, 7:56 AM[\w ]{0,255}
, now the contract tests fail, because the example value of "6 ]]]" (generated by pact) does not match the specified regex. I think the generator thinks it may repeat the closing square bracket of the character list.Tim Vahlbrock
11/18/2024, 7:05 AMTim Vahlbrock
12/09/2024, 9:53 AMTim Vahlbrock
12/09/2024, 10:01 AMTim Vahlbrock
12/09/2024, 10:14 AM