Replace `case true...when` with equivalent `if...elsif` statements
Convert hexadecimal literals to binary literals; remove comments
JSON text and values are empty if their length is <= 0
Make all methods private except decode and encode