Hello,

The C data interface spec was updated following a suggestion
by Wes and Uwe:
https://github.com/apache/arrow/blob/3173f88dfa32ce3296a121b032f351e089888601/docs/source/format/CDataInterface.rst

The metadata encoding was changed.  It does not use JSON anymore
but a very simple binary encoding.  Quoting the spec:

   This string is not null-terminated but follows a specific format::

      int32: number of key/value pairs (noted N below)
      int32: byte length of key 0
      key 0 (not null-terminated)
      int32: byte length of value 0
      value 0 (not null-terminated)
      ...
      int32: byte length of key N - 1
      key N - 1 (not null-terminated)
      int32: byte length of value N - 1
      value N - 1 (not null-terminated)

   For example, the metadata ``[('key1', 'value1')]`` is encoded as::

      \x01\x00\x00\x00\x04\x00\x00\x00key1\x06\x00\x00\x00value1


The C++ draft implementation now supports metadata exporting and importing:
https://github.com/apache/arrow/pull/5608

Regards

Antoine.

Reply via email to