fix to_json twice

A found document has been converted to JSON twice.