import.io json API: 获取列的列表,包含子字段

import.io json API: get the list of columns, with subfields

我正在使用 import.io API 并注意到某些字段类型 return 在生成的 json 中有几列。例如,类型为 Money 的字段 foo 将 return 三列:foofoo/_currencyfoo/_source.

有参考资料吗?我通过一个不完整的示例在这里 http://blog.import.io/post/11-columns-of-importio 找到了一些文档:

{
  "whole_number_field": 123,
  "whole_number_field/_source": "123",

  "language_field": "ben",
  "language_field/_source": "bn",

  "country_field": "CHN",
  "country_field/_source": "China",

  "boolean_field": false,
  "boolean_field/_source": "false",

  "currency_field/_currency": "GBP",
  "currency_field/_source": "£123.45",

  "link_field": "http://chris-alexander.co.uk",
  "link_field/_text": "Blog",
  "link_field/_title": "linktitle",

  "datetime_field": 611368440000,
  "datetime_field/_source": "17/05/89 12:34",
  "datetime_field/_utc": "Wed May 17 00:34:00 GMT 1989",

  "image_field": "http://io.chris-alexander.co.uk/gif2.gif", 
  "image_field/_alt": "imgalt",
  "image_field/_title": "imgtitle",
  "image_field/_source": "gif2.gif"
}

我通过几次测试确定了这一点,我想知道我是否遗漏了什么: { 'DATE': ['_source', '_utc'], # please tell me if you have an example of an import.io API with a date! 'BOOLEAN': ['_source'], 'LANG': ['_source'], 'COUNTRY': ['_source'], 'HTML':[], 'STRING':[], 'URL': ['_text', '_source', '_title'], 'IMAGE': ['_alt', '_title', '_source'], 'DOUBLE': ['_source'], 'CURRENCY': ['_currency', '_source'], }

这些列记录在 API 文档中: http://api.docs.import.io/

例如,对于货币,列是:

  • myvar <== 提取值
  • myvar/_currency <== ISO 货币代码
  • myvar/_source <== 原值

ISO货币代码返回为myvar/_currency,myvar中的数值