jsonata.net.native icon indicating copy to clipboard operation
jsonata.net.native copied to clipboard

Support for object lazy initialization

Open ItsVeryWindy opened this issue 10 months ago • 3 comments

The issue I'm trying to deal with is that I'm trying to build a JObject and execute queries against it at the same time. But as I don't know what part of the object the query is going to access I don't know which bits need to be built first.

Ideally I'd be able to hook into when properties are being accessed so I can lazily initialize them.

In javascript I can use Proxy for this to intercept property access.

I think this could be achieved relatively easily by adding overloads on JObject and JArray that allows for custom dictionary and list implementations respectively.

ItsVeryWindy avatar Jan 04 '25 01:01 ItsVeryWindy