Am I missing something? BsonDocument.Parse()
appears to allow invalid JSON input where there is valid document before the invalid characters start?
For example I would consider invalid, but parses fine:
{
"_id": ObjectId("5731080e61737e37f84c848d")
}
This is not a typo(
What happens is it will parse the initial document and ignore anything after the initial document.
Surely it should treat this as invalid?
This is likely because the parser simply parses the first document then stops, but I'd argue if anything else is in the token stream it should be considered a fail.