add `encode_jbuilder` method