I need to persist some objects into my database and the quickest way seemed to be to convert them to JSON, then save that. That works ok with a Dataset, but fails on an object that contains a Dataset.
Python's json.dumps also fails, even on the basic Dataset. Java's jackson returns a similar error to jsonEncode.
I'm surprised I couldn't find anything else on the forum about this. Does anyone have a workaround, or do I have to convert all the Datasets to Python dicts/lists myself first?
I can’t remember when it changed but a Dataset is now also interchangeable with a pyDataset.
Encode the dataset then add it to the dict as json, then it should work.
I believe the conversion may not work correctly unless it can detect the Dataset type directly.