implement json.[Unm|M]arshaling interfaces for Level
tests: added tests for json marshaling/unmarshaling