Renders the path in a JSON document to a string. The {@code pathNames} and {@code pathIndices} parameters corresponds directly to stack: At indices where the stack contains an object (EMPTY_OBJECT, DANGLING_NAME or NONEMPTY_OBJECT), pathNames contains the name at this scope. Where it contains an array (EMPTY_ARRAY, NONEMPTY_ARRAY) pathIndices contains the current index in that array. Otherwise the value is undefined, and we take advantage of that by incrementing pathIndices when doing so isn't useful.