Encoder: return error on invalid boolean value
Rework API (rename / delete stuff, introduce Object)