fixed regex
better error handling
allow_nonref for JSON::PP