assets_encode to treat assets or entity