I have some kind of a validation. The problem is that it gives back the error path like
<property>/<anotherProperty>
While in codemirror, what i needed is from and to. Is there any utility in codemirror, that would allow to map properties path like this, to from and to ? The closest I could get is using json string and a bunch of regex, but it is not the most reliable option.
Is this in a JSON document? You might be able to use the syntax tree to find the range corresponding to a given path, but it’d require some programming.
So if you go line by line you could have a lot of different variations of how the same object is being written, so relying on the fact that string which has { would not be reliable.