我可以在Android中使用Json从((**任何**))Web应用程序读取数据吗? [英] Can I Use Json In Android To Read Data From ((**Any**)) Web Application ?!

查看:57
本文介绍了我可以在Android中使用Json从((**任何**))Web应用程序读取数据吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。我做了一年的网络应用程序,它运作良好!

此应用程序向客户显示产品及其详细信息。

现在我想开发我的应用程序并使用智能手机(android)从Web应用程序读取数据。 我知道如何从android&中的Web应用程序返回Xml我这样做了



但是

如果我想使用Json .. 。?



阅读并实现如果你想在android项目中使用json ,您的Web应用程序应该支持Json。

例如:Twitter支持Json。

这是否意味着我必须改变我的网络应用程序结构?!



我是对的吗?或者它不是真的?



和另一个问题:你会建议做什么?

我的意思是你可以简单地返回Xml或使用Json。



哪一个更好?

Hi All . I made a web Application 1 years a go and it works very well !
this application Shows Products and their details to customers .
now i want to develop my app and Use Smart phones(android) to read Data From web Application . i know how to Return Xml from Web app in android & i did that

BUT
If i want to Use Json ... ?!

I read and Realized if you want to Use json in android project , Your web application Should Supports Json.
For Example : Twitter Supports Json .
Does it mean "i have to change my Web app Structure " ?!

Am I right ? Or Its not True ?

and another Question : what would you recommend doing ?
i mean You can Simply Return Xml OR Use Json .

which one is better ?

推荐答案

是的,你当然是对的。该怎么办?这完全取决于你。



哪一个更好? 更好是未定义的东西。这可以是根据某些条件计算的谓词。但是,从您的帖子中,您是否制定了问题,除了我想使用JSON之外,我看不出使用JSON的任何理由。如果这是原因,它听起来像使用JSON来使用JSON 。如果这真的是重点,对我来说这看起来很荒谬,然后我建议你保持工作正常。



我不知道你的全部虽然情况。也许你有一些真正的理由。改变它。 :-)



-SA
Yes, you are right, of course. What to do? It's totally up to you.

Which one is better? "Better" is something undefined. This can be a predicate calculated depending on some conditions. However, from your post, is you formulated the problem, I cannot see any reason for using JSON except your "I want to use JSON". If this is the reason, it sounds like using JSON for the sake of using JSON. If this is really the point, it would look ridiculous to me, and then I would advise you to keep a working thing working.

I don't know all your circumstances though. Maybe you have some real reason. The change it. :-)

—SA


这篇关于我可以在Android中使用Json从((**任何**))Web应用程序读取数据吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆