Prior to this commit, serializing `java.nio.file.Path` caused
a StackOverflowError because `Path.iterator()` always returns itself
as the first element of the iterator, which results in a
StackOverflowError.
This commit serializes `java.nio.file.Path` as JSON String.
See gh-44507
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>