use Yajl encoder to handle json conversions fixes #19