My project yaramail uses simplejson to return details in JSON format, including YARA matches. This worked fine until yara-python 4.3.0. When yara-python 4.3.0 is used, simplejson raises a TypeError exception, with the error message "Object of type StringMatch is not JSON serializable"
4.3.0 changed string matches to be an actual object with properties for the offset and length instead of a tuple. You can convert it into whatever you like, but accessing it as a tuple is no longer possible.
My project yaramail uses simplejson to return details in JSON format, including YARA matches. This worked fine until yara-python 4.3.0. When yara-python 4.3.0 is used, simplejson raises a TypeError exception, with the error message "Object of type StringMatch is not JSON serializable"