
本文共 2402 字,大约阅读时间需要 8 分钟。
JSONObject ������ JSONArray������ JSON ���������������������������������
��������������������������� HTTP ��������������������������������������������������������� JSONObject ��� JSONArray ���������������������������Java������������������������������������������ HTTP ������������ JSONObject ��� JSONArray ���������������������������������������������������������
1. ��� HTTP ������������ JSONObject
������������������ HTTP ������������������������������������������ JSONObject ������������������������������������������������������
JSONObject jsonObeect = JSONObject.fromObject(httpPost4Instream);
��������������������������������������������������������������������������������������������� JSON ���������������
2. ������ JSONArray ���������
��������������� JSONObject ��������������� "stores" ��� JSONArray���
JSONArray jsonArray = jsonObeect.getJSONArray("stores");
������������������������ "stores" ������������������������������������������������������������������������������������������
3. ������ JSONArray ������������������������������
��� JSONArray ������������������������������������������������
String string = jsonArray.getString(0);
��������������������� JSON ���������������������������������������������
������������������������ JSONObject ���������
JSONObject fromObject = JSONObject.fromObject(string);
������������������������������ "startDate" ��� "endDate" ���������������������������
4. ������������
���������������������������������������������������������������������������������������������������������������������������������
param.setFromDate(Long.valueOf(startDate).longValue());param.setToDate(Long.valueOf(endDate).longValue());
������������������������������������������������������������������������������������������������������������������
���������������������
���������������������������������������������������������������������������������������������������������������������������������������
- ������������JSONObject���JSONArray���������������������������
- ���������������������������������������������������������
- ���������������������������������������������������
������������������������������������������������������������������������������������������������������������������������������������
������������������������������������������������������������������������������������������������������������������������������������������������������������������
发表评论
最新留言
关于作者
