encode extra and offices as json