Use the same JSON schema for encoding enums in PrettyEncoder as in Encoder

Closes issue #17607