android - 如何在没有 Pojo 的情况下从 api 添加数据
问题描述
我从无法转换为 pojo 的 api 获取数据,因此无法以正常方式获取数据 我得到的数据
{"TABLE_DATA":"
{\"data\":[
[\"Tiger Nixon\",\"System
Architect\",\"Edinburgh\",\"5421\",\"2011/04/25\",\"$320,800\"],
[\"Garrett
Winters\",\"Accountant\",\"Tokyo\",\"8422\",\"2011/07/25\",\"$170,750\"],
[\"Ashton Cox\",\"Junior Technical
Author\",\"SanFrancisco\",\"1562\",\"2009/01/12\",\"$86,000\"],
[\"Cedric Kelly\",\"Senior Javascript
Developer\",\"Edinburgh\",\"6224\",\"2012/03/29\",\"$433,060\"],
[\"Airi
Satou\",\"Accountant\",\"Tokyo\",\"5407\",\"2008/11/28\",\"$162,700\"],
[\"Brielle Williamson\",\"Integration Specialist\",\"New
York\",\"4804\",\"2012/12/02\",\"$372,000\"],
[\"Herrod Chandler\",\"Sales Assistant\",\"San
Francisco\",\"9608\",\"2012/08/06\",\"$137,500\"],
[\"Rhona Davidson\",\"Integration
Specialist\",\"Tokyo\",\"6200\",\"2010/10/14\",\"$327,900\"],
[\"Colleen Hurst\",\"Javascript Developer\",\"San
Francisco\",\"2360\",\"2009/09/15\",\"$205,500\"],
[\"Sonya Frost\",\"Software
Engineer\",\"Edinburgh\",\"1667\",\"2008/12/13\",\"$103,600\"],
[\"Jena Gaines\",\"Office
Manager\",\"London\",\"3814\",\"2008/12/19\",\"$90,560\"]`
没有可用的 pojo 这是我第一次在 API 中工作,任何指南都会有所帮助。我正在使用 retofit 和 rxjava2 接收以下数据。数据格式为 post 方法。
解决方案
这是一个 jquery 格式。您可以尝试使用此https://javacodegeeks.com/2013/02/jquery-datatables-and-java-integration.html
也看看这个主题stackoverflow.com/questions/48942253/how-to-implement-jquery-datatable-in-android-any-library
您从中获取数据的服务可能有机会设置数据格式,您必须在 GET 查询中指定它,查看 API 文档。
推荐阅读
- javascript - 在 JavaScript 中将数据导出为 CSV
- android - 按钮颜色和渐变的功能
- perl - 无法在 perl 中获取 YAML 文档节点
- awk - awk zip 行,如 python zip
- android - 毕加索没有在 ImageView 上加载图像
- python - 加载模型和应用预测的正确方法
- java - 使用 if else 语句进行 JOptionPane 输入验证
- php - Query Join table to sort by menudindex
- java - eclipselink的级联删除问题
- ruby-on-rails - Webpacker 安装给出错误:无法加载此类文件 — ubygems