I need to store some boolean literal values (like showGrid). JSON.stringify turns literal booleans to literal strings ("true" or "false"). It's bit painful to deserialize these kind of 'strings that contains a literal' in getter methods. Hence the encapsulation in JSON object to serialize/deserialize easily all literal types.

I found this approach to solve serialization of literals quite elegant and simple. If you have a better/more elegant way to solve this use case, please let me know.