String stopping criteria might need to be more specific
I see in the code and the readme that the stopping criteria for strings is the second quotation mark. However, in most json dialects you can escape a quote in a string with \". This appears sometimes so it's not impossible for the LLM to produce this, too.
e.g. the prompt might be "extract the second sentence from the following paragraph" and the paragraph is:
This is the first sentence. This is the "second" sentence. This is the third sentence.
The LLM would ideally output "This is the \"second\" sentence." but the parser wouldn't handle this correctly.
#16 mentions using ", as the stop word instead—might be a bit better. Maybe even including the newline (",\n) could help.
Also, I've seen some LLM's configured to entirely avoid generating the \ character at all if you just looking to avoid escape sequences entirely.
Using ", doesn't solve the problem of escaping since \", is part of a valid JSON string, but does not close the string.