Do not show parts of data but keep it behind the scenes

Example:

Let’s say there is a property on the object. We don’t want to show it in the json, but when we parse it or get node data at certain position, we need that property.

There is an option to match it by index or path in the original extended data object.

E.g.

someProp.0.someObject.somePropWhichIsHiddenInJson

So we would check in json editor the path to this property, we check initial data. However, it means parsing json to a tree and matching by index is not quite reliable.

Is there a good way to preserve the data, but not show it in the json editor?

You can use decorations to hide parts of a document in the editor. But it’ll still be tricky to get such an editor to behave correctly when, for example, the user deletes code near the hidden content in a way that makes the content invalid at that position.