did not know about __complex__ thank you.  Where is it from?

That is the intention, and so poor choice of name as it led to confusion (the idea was that the resulting object would be json-suit-able)  ... anyway

At the moment the class above it unlikely to be used, as plugging it in I found I was unable to pass in the requesting user or any other security details - so I am looking at very simple call that returns a python object suitable for conversion to json without extra help.

The idea is you use the above class as

    json.dumps(myobj, encoder=CNXJsonEncoder)

Anyway, it expects a class to be passed in, making passing in a (thread-level) variable at this point
tricky.
(I may not have encoder as the right param)




Phil is concerned that I should not need to pass in userid to read the object, as presumably I have done that in retrieving the object in the first place.  My concern is I am using lazy evaluation (ie not pulling back all the children of a folder at retrieval time, so  only at read do I know the children)


Currently my solution is to use a method on the object to return a dict representing the obj, then pass that to json.dump