transformed level to JSON