Currently the custom_fields are passed in as a JSON string. It would be better to create a struct for custom fields and expose it for users.