Convert Baldur's Gate data structures to json and back again