Serialize JSON From DataTables to Tree object?

Right, that’s what I’m trying to do, currently looking for clues in the implementation of the to_json definition in the github repo.