convert to using ffi_yajl