Attempt at new JSON representation of types