Encode booleans properly
Add specs for encoder
Handle 'null'