问题标签 [android-parser]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - 字符串无法转换为 JSON 对象
当我从本地数据库中获取数据时,我在 Json 对象中获取值并将其转换为字符串,结果可以在本地服务器中看到。
但是..当我在实时数据库上执行相同的代码时,数据无法转换为 Json 对象。
这是我的代码 -
这是我在 logcat 中遇到的错误 -
这是我在 JSON 中的结果 -
android - 安卓的DOMParser
我在学习如何很好地使用 android 的 DOm 解析器我使用示例 androidHive.com 的 Servivce
“ http://api.androidhive.info/pizza/?format=xml ”
我使用 URLCONnection 连接到一个服务器,它有一个用户名和密码来连接,但它返回 nullPointerException。
protected static InputStream getInputStream(URL url) { try{
这是我的代码:
android - 当我在 android 中请求超过 4 次时,Asp.Net 服务不返回响应消息
我正在制作 android 应用程序,我正在解析来自 Asp.NET 服务的数据,当我调用服务超过 4 次时,它没有返回响应,我没有从中获取数据,并且在等待大约 10 分钟后服务正常工作,我可以从中获取数据。我正在尝试 2 周,但我没有解决它。请帮助我..代码如下
android - Android get Wrong result using Json Post data
in this simple code i'm sending username and password to server. if those are correct i must be get this result :
but i get:
for this sample my username and password is correct.
whats my problem in code? i think after using HttpPost
i must be get result another method such as HttpGet
. is that right?
My Code:
Thanks.
java - jsoup 在带有多个 if 语句的 asynctask 中无法正常工作
我正在制作一个应用程序来使用 JSOUP 从 url 获取一些 html。从单个 url 解析可以正常工作,但是每当我使用多个 url 时它就不起作用。这是我的代码:
使用 switch case 将密钥发送到 asynctask。我想再添加 8 个 if 语句到 doInbackground
我的问题是,每当我在没有' if ' 语句的情况下运行这个项目时,它都可以工作,但是如果我添加 'if(xy=="abcd")' 它就不起作用。没有错误,所以我想不通。
android - 无法将图像从 Json 解析到 Android 中的列表视图
我正在尝试将图像和文本从 url 解析到列表视图。
我成功解析名称但无法解析图像。我按照这些链接....
我在图像加载器类中得到位图值 null ..
我从以下链接复制了 MemoryCache 和 File Cache 类...我的代码有什么错误吗?
我的 Json 是:http://192.185.159.159/~charmmar/raj_spice/webservices/index.php?action=products
如果 json 很大,图像解析有问题吗?
- http://www.androidbegin.com/tutorial/android-json-parse-images-and-texts-tutorial/
- http://luchfilip.wordpress.com/2014/02/25/android-how-to-parse-json-and-show-images-and-texts-in-a-listview/comment-page-1/
- http://www.androidhive.info/2014/07/android-custom-listview-with-image-and-text-using-volley/
在这些链接中都包含ImageLoader
, FileCache
,MemoryCache
类,但我无法解析图像......是否需要任何特殊的库?
我的课:
我的适配器类:
这是我所有课程的链接.. http://ge.tt/8keNUh62?c。在此链接中,我使用的所有课程都可用。
请帮忙!
java - 解析双精度值并在 TextView 中设置
对于解析数据,我使用改造 (gson) library。我在解析双值 'position'时遇到问题。您可以在下面看到完整的 JSON。我解析字符串数组'words'很好,但有双值我在TextView中什么都没有。谁能说出到底错在哪里,我需要解决什么以及我错过了什么?
谢谢你的帮助!
JSON
MainActivity.java
PositionResponse.java
java - 如何使用 Retrofit 解析 JSON
我在 Retrofit 中解析 Json 时遇到问题。我的网址: http: //192.168.0.102 :8000/api/get_services?keyword=someword
Someword 这里是用户在对话窗口中写的单词。
我只需要
- 坐标
- 地址
- 公司名称
在这里,我的坐标为空。我想把结果显示给谷歌地图。
怎么了?我该如何解决问题?
JSON:
LocationActivity.java
网络工厂.java
ApiCalls.java
PositionResponse.java
android - LoganSquare 解析 Android 库:反馈、基准、优点、缺点
我正在使用Jackson和 DataBind 库来解析 json 并将其映射到 java 对象。我还在其他不需要性能的项目上使用 Gson。
2 月 17 日,LoganSquare库首次发布,承诺解析速度比 Gson 快 4-10 倍。
- LoganSquare 比 Gson/Jackson 没有什么优势?
- 优点和缺点?
- 您在生产应用程序中有基准吗?
- 对于生产应用程序来说足够稳定吗?
我知道这可能是一个主要基于意见的问题,因此尽可能技术性和具体性,并将您的答案基于真实数据。
java - Android - 如果其他条件不起作用
我在我的本地主机中有一个表,我最初将所有项目的 Rating(//Column name) 值设置为 0。我想运行一个循环。但是尽管在列中更新它会运行 else 循环。