json export for planes. untested. old tests broken. WIP