I couldn't find any documentation about Twig Fields using Display Suite, so I decided to create one on my own. You are very welcome to add more information.
Adding a Twig field in Drupal Display Suite, you can use the following syntaxes:
Render the ID of the current entity:
{{ entity.id }}
Render the value of a text field (called 'Foo'):
{{ entity.field_foo[0].value }}
This does not work (it will only generate "{}
"):
{{ entity.field_foo|json_encode }}