【问题标题】:import.io json API: get the list of columns, with subfieldsimport.io json API:获取包含子字段的列列表
【发布时间】:2015-11-24 18:10:02
【问题描述】:

我正在使用 import.io API,并注意到某些字段类型在生成的 json 中返回了几列。例如,Money 类型的字段 foo 将返回三列: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"
}

【问题讨论】:

    标签: import.io


    【解决方案1】:

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

    例如,对于货币,列是:

    • myvar
    • myvar/_currency
    • myvar/_source

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

    【讨论】:

      【解决方案2】:

      我通过几次测试确定了这一点,我想知道我是否遗漏了什么: { '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'], }

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-03-15
        • 2017-01-12
        • 2021-05-02
        • 1970-01-01
        相关资源
        最近更新 更多