1. 程式人生 > >LotusScript 呼叫WSDL 並解析Json字串

LotusScript 呼叫WSDL 並解析Json字串

END REM '************************************************* 'Globalization constants Const ERR_INVALID_JSON = "Invalid JSON format." Const ERR_MOVE_PAST_LAST = "Invalid JSON format. Attempting to move past last character." Const ERR_MOVE_PAST_FIRST = "Invalid JSON format. Attempting to move past first character."
Const ERR_INFINITE_LOOP = "Invalid JSON format. Parser is inside infinite loop." Const ERR_CURRENT_CHAR = "Current character = " Const ERR_PREVIOUS_CHAR = "Previous character = " Const ERR_REMAINING_STRING = "Remaining string = " Const ERR_ATLINE = " at line " Const ERR_PREFIX = "ERROR " '************************************************* Class JSONReader '
********************************************************************************************* '* Version: 1.0.3 '* Purpose: This class provides a way to parse JSON text into either a '* JSONObject or JSONArray object or some combination. However, '* it will always return some
type of object (if the JSON is valid). '* Both the JSONObject and JSONArray classes have an Items property. '* You can put the value of the returned object Items property into a variant '* then step through the results. '* '* This class uses the ls.class.JSONArray and ls.class.JSONObject classes. '* '* Example: '* dim sJSON as String '* dim jsonReader as JSONReader '* dim vResults as Variant '* dim vPieces as Variant '* set jsonReader = New JSONReader '* sJSON = |{"a":[15,25],"b":"Some text"}| '* vResults = jsonReader.Parse(sJSON) 'this is a JSONObject '* vPieces = vResults.Items '* '* Methods: Parse(JSON string) '* '* Author: Troy Reimer ([email protected]) '********************************************************************************************* Private m_sJSON As String 'the original string Private m_iIndex As Long 'the current character index Private m_iPrevIndex As Long 'the previous character index Private m_iLen As Long 'the current string length Private m_iOrigLen As Long 'the original string length Private m_sChar As String 'the current character Private m_sPrev As String 'the previous character Private m_sWorking As String 'the remaining string Private m_vToken As Variant 'the current token value Private m_sEscapes List As String 'a list of escape characters Private m_bHasOperator As Boolean 'flag indicating a number has an operator 'like a date (1/27/2009) Private OBJECT_END As ObjectEnd Private ARRAY_END As ArrayEnd Private COLON As Colon Private COMMA As Comma Public Sub New Set OBJECT_END = New ObjectEnd Set ARRAY_END = New ArrayEnd Set COLON = New Colon Set COMMA = New Comma Me.m_sEscapes(|"|) = |"| Me.m_sEscapes(|\|) = |\| Me.m_sEscapes(|/|) = |/| Me.m_sEscapes(|b|) = Chr(8) Me.m_sEscapes(|f|) = Chr(12) Me.m_sEscapes(|n|) = Chr(10) Me.m_sEscapes(|r|) = Chr(13) Me.m_sEscapes(|t|) = Chr(9) End Sub %REM Parse %END REM Public Function Parse(p_sJSON As String) As Variant '********************************************************************************************* '* Purpose: This is the only public method for this class. It returns an object '* created from parsing the input JSON string. '* '* Input: p_sJSON: The JSON string to parse '* '* Output: Either a JSONArray or JSONObject or combination '* '* Calls: ParseMe '********************************************************************************************* Dim sFirstChar As String Dim sLastChar As String On Error Goto ErrorHandler Me.m_sJSON = Trim(p_sJSON) Me.m_iIndex = 0 Me.m_iPrevIndex = -1 Me.m_iLen = Len(Me.m_sJSON) Me.m_iOrigLen = Len(Me.m_sJSON) Me.m_sWorking = Me.m_sJSON Me.m_sChar = Left(Me.m_sWorking, 1) sFirstChar = Left(Me.m_sJSON, 1) sLastChar = Right(Me.m_sJSON, 1) If (sFirstChar = "[" And sLastChar = "]") Or (sFirstChar = "{" And sLastChar = "}") Then Set Parse = Me.ParseMe Else Set Parse = Nothing Error 1000, ERR_INVALID_JSON End If Done: Exit Function ErrorHandler: On Error Goto 0 Error Err, Getthreadinfo(10) & ": " & ERR_PREFIX & Err & ": {" & Error$ & "}" & ERR_ATLINE & Erl & ". " & _ ERR_CURRENT_CHAR & "'" & Me.m_sChar & "'; " & _ ERR_PREVIOUS_CHAR & "'" & Me.m_sChar & "'; " & _ ERR_REMAINING_STRING & "'" & Me.m_sWorking & "'" End Function %REM ParseMe %END REM Private Function ParseMe As Variant On Error Goto errh_ParseMe '********************************************************************************************* '* Purpose: This function moves to the next character in the remaining string '* and returns either a new JSONObject / JSONArray or the value of the '* current token. '* '* Output: An object or value for the current token '* '* Calls: CreateJSONArray '* CreateJSONObject '* GetNext '* GetNumericValue '* GetPrevious '* GetStringValue '* SkipWhiteSpace '********************************************************************************************* Dim sChar As String Call Me.SkipWhiteSpace sChar = Me.m_sChar Call Me.GetNext If Me.m_iIndex <> Me.m_iPrevIndex Then 'check to make sure we are not in a loop Me.m_iPrevIndex = Me.m_iIndex Select Case sChar Case |{| 'begin object Set Me.m_vToken = Me.CreateJSONObject Case |}| 'end object Set Me.m_vToken = Me.OBJECT_END Case |[| 'begin array Set Me.m_vToken = Me.CreateJSONArray Case |]| 'end array Set Me.m_vToken = Me.ARRAY_END Case |"| 'string Me.m_vToken = Me.GetStringValue Case |,| 'comma Set Me.m_vToken = Me.COMMA Case |:| 'colon Set Me.m_vToken = Me.COLON Case |t| 'true Call Me.MoveNextN(3) Me.m_vToken = True Case |f| 'false Call Me.MoveNextN(4) Me.m_vToken = False Case |n| 'null Call Me.MoveNextN(3) Me.m_vToken = Null Case Else 'probably a numeric value Call Me.GetPrevious If Isnumeric(Me.m_sChar) Or Me.m_sChar = "-" Then 'this is a number Me.m_vToken = Me.GetNumericValue End If End Select If Isobject(Me.m_vToken) Then Set ParseMe = Me.m_vToken Else ParseMe = Me.m_vToken End If Else 'error we are in a loop Error 1000, ERR_INFINITE_LOOP End If Exit Function errh_ParseMe: Msgbox "Function ParseMe---"+Error+"erl------"+Cstr(Erl) End Function %REM CreateArray %END REM Private Function CreateJSONArray As JSONArray '********************************************************************************************* '* Purpose: This function creates and populates a JSONArray object with all of its '* values. '* '* Output: A poplated JSONArray object '* '* Calls: ParseMe '* SkipWhiteSpace '********************************************************************************************* Dim jsonArray As JSONArray Dim vValue As Variant Set jsonArray = New JSONArray Call Me.SkipWhiteSpace If Me.m_sChar = "{" Or Me.m_sChar = "[" Or Me.m_sChar = "]" Then 'value is an object Set vValue = Me.ParseMe Else vValue = Me.ParseMe End If While Typename(Me.m_vToken) <> "ARRAYEND" Call jsonArray.AddItem(vValue) If Typename(Me.ParseMe) = "COMMA" Then Call Me.SkipWhiteSpace If Me.m_sChar = "{" Or Me.m_sChar = "[" Then Set vValue = Me.ParseMe Else vValue = Me.ParseMe End If End If Wend Set CreateJSONArray = jsonArray End Function %REM CreateJSONObject %END REM Private Function CreateJSONObject As JSONObject '********************************************************************************************* '* Purpose: This function creates and populates a JSONObject object with all of its '* values. '* '* Output: A poplated JSONObject object '* '* Calls: ParseMe '* SkipWhiteSpace '********************************************************************************************* Dim jsonObject As JSONObject Dim vKey As Variant Set jsonObject = New JSONObject Call Me.SkipWhiteSpace vKey = Me.ParseMe While Typename(Me.m_vToken) <> "OBJECTEND" Call Me.ParseMe 'this character should be a colon If Typename(Me.m_vToken) <> "OBJECTEND" Then Call jsonObject.AddItem(Cstr(vKey), Me.ParseMe) If Typename(Me.ParseMe) = "COMMA" Then vKey = Me.ParseMe End If End If Wend Set CreateJSONObject = jsonObject End Function %REM GetDigits %END REM Private Function GetDigits As String '********************************************************************************************* '* Purpose: This function walks the remaining string until a non-numeric value '* is found. It returns the digits found. '* '* Output: A string of digits '* '* Calls: GetNext '********************************************************************************************* Dim sReturn As String While Isnumeric(Me.m_sChar) Or Me.m_sChar = "+" Or Me.m_sChar = "-" Or Me.m_sChar = "*" Or Me.m_sChar = "/" If Me.m_sChar = "+" Or Me.m_sChar = "-" Or Me.m_sChar = "*" Or Me.m_sChar = "/" Then Me.m_bHasOperator = True End If sReturn = sReturn & Me.m_sChar Call Me.GetNext Wend GetDigits = sReturn End Function %REM GetNext %END REM Private Function GetNext As String '********************************************************************************************* '* Purpose: This function moves the "pointer" to the next character in the string. '* '* Output: The next character in the string '********************************************************************************************* Me.m_iLen = Me.m_iLen - 1 Me.m_iIndex = Me.m_iIndex + 1 If Me.m_iLen < 0 Then 'for some reason we are trying to move past the last character. Error 1000, ERR_MOVE_PAST_LAST End If If Me.m_iIndex > Me.m_iOrigLen Then Me.m_iIndex = Me.m_iOrigLen End If Me.m_sPrev = Left(Me.m_sWorking, 1) Me.m_sWorking = Right(Me.m_sWorking, Me.m_iLen) Me.m_sChar = Left(Me.m_sWorking, 1) GetNext = Me.m_sChar End Function %REM GetNumericValue %END REM Private Function GetNumericValue As Variant '********************************************************************************************* '* Purpose: This function returns either a Long or Double value for the numeric '* string being parsed. '* '* Output: Long or Double number '* '* Calls: GetDigits '* GetNext '********************************************************************************************* Dim sReturn As String Dim bIsFloatingPoint As Boolean Dim vEval As Variant Me.m_bHasOperator = False sReturn = Me.m_sChar Call Me.GetNext sReturn = sReturn & GetDigits If Me.m_bHasOperator Then vEval = Evaluate(sReturn) sReturn = Cstr(vEval(0)) bIsFloatingPoint = True Else 'check to see if this is a floating point number If Me.m_sChar = "." Then sReturn = sReturn & Me.m_sChar Call Me.GetNext sReturn = sReturn & GetDigits bIsFloatingPoint = True End If If Lcase(Me.m_sChar) = "e" Then sReturn = sReturn & Me.m_sChar Call Me.GetNext If Me.m_sChar = "+" Or Me.m_sChar = "-" Then sReturn = sReturn & Me.m_sChar Call Me.GetNext sReturn = sReturn & GetDigits End If bIsFloatingPoint = True End If End If 'return either a double or long value If bIsFloatingPoint Then GetNumericValue = Cdbl(sReturn) Else GetNumericValue = Clng(sReturn) End If End Function %REM GetPrevious %END REM Private Function GetPrevious As String '********************************************************************************************* '* Purpose: This function moves the "pointer" to the previous character in the string. '* '* Output: The previous character in the string '********************************************************************************************* Me.m_iLen = Me.m_iLen + 1 Me.m_iIndex = Me.m_iIndex - 1 If Me.m_iLen > Me.m_iOrigLen Then Me.m_iLen = Me.m_iOrigLen End If If Me.m_iIndex < 0 Then 'for some reason we are trying to move past the first character. Error 1000, ERR_MOVE_PAST_FIRST End If Me.m_sWorking = Me.m_sPrev & Me.m_sWorking Me.m_sChar = Left(Me.m_sWorking, 1) Me.m_sPrev = Mid(Me.m_sJSON, Me.m_iIndex, 1) GetPrevious = Me.m_sChar End Function %REM GetStringValue %END REM Private Function GetStringValue As String '********************************************************************************************* '* Purpose: This function returns the string value contained within quotes. '* It also accounts for unicode characters and escape characters. '* '* Output: The string value '* '* Calls: GetNext '* GetPrevious '********************************************************************************************* Dim sReturn As String Dim sUnicode As String Dim vEval As Variant Dim x As Integer While Me.m_sChar <> |"| If Me.m_sChar = |\| Then Call Me.GetNext If Me.m_sChar = "u" Then 'unicode character sUnicode = "" For x = 1 To 4 'retrieve the four digit unicode Call Me.GetNext If Me.m_sChar = |"| Then Call Me.GetPrevious Exit For Else sUnicode = sUnicode & Me.m_sChar End If Next sReturn = sReturn & Uchr$("&h" & sUnicode) Else 'transform if this is an escaped char If Iselement(Me.m_sEscapes(Me.m_sChar)) Then sReturn = sReturn & Me.m_sEscapes(Me.m_sChar) End If End If Else sReturn = sReturn & Me.m_sChar End If Call Me.GetNext Wend Call Me.GetNext GetStringValue = sReturn End Function %REM MoveNextN %END REM Private Sub MoveNextN(p_iCount As Integer) '********************************************************************************************* '* Purpose: This sub moves the "pointer" the specified number of places. '********************************************************************************************* Dim x As Integer For x = 1 To p_iCount Call Me.GetNext Next End Sub %REM Peek %END REM Private Function Peek As String '********************************************************************************************* '* Purpose: This function looks at the next character in the string but doesn't move there. '* '* Output: The next character in the string. '********************************************************************************************* Peek = Left(Me.m_sWorking, 1) End Function %REM SkipWhiteSpace %END REM Private Sub SkipWhiteSpace '********************************************************************************************* '* Purpose: This sub moves the "pointer" to the next non-space character. '********************************************************************************************* Dim sPeek As String sPeek = Me.Peek While sPeek = " " Or Asc(sPeek) = 10 Or Asc(sPeek) = 13 Call Me.GetNext sPeek = Me.Peek Wend End Sub End Class '*************************************************************************************************** ' These classes are used as markers to indicate that a stopping point is reached. ' They are only used for their TypeNames. '*************************************************************************************************** Class ArrayEnd End Class Class ObjectEnd End Class Class Colon End Class Class Comma End Class ----------ls.snapps.JSONArray-Script檔案---------------------- Option Public Option Declare 'use this library if you don't need the ability to convert the JSONArray to a JSON string %REM Copyright 2007, 2008, 2009 SNAPPS (Strategic Net Applications, Inc.) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. %END REM Class JSONArray '********************************************************************************************* '* Version: 1.0.3 '* Purpose: This class is a wrapper for an array in a JSON string '* '* Properties: Count: The number items '* Items: Returns all items in the JSONArray '* '* Methods: AddItem(Value): '* Adds the value to the JSONArray '* RemoveItem(Index) '* Removes the value of the specified array index '* ReplaceItemValue(Index, Value) '* Replaces the value in the specified array index '* '* Author: Troy Reimer ([email protected]) '********************************************************************************************* Private m_vData As Variant Private m_iCount As Integer Property Get Count As Integer Count = Me.m_iCount End Property Property Get Items As Variant If Isobject(Me.m_vData) Then Set Items = Me.m_vData Else Items = Me.m_vData End If End Property Public Sub AddItem(p_vValue As Variant) Me.m_iCount = Me.m_iCount + 1 If Isarray(Me.m_vData) Then Me.m_vData = Arrayappend(Me.m_vData, p_vValue) Else Redim Me.m_vData(0) If Isobject(p_vValue) Then Set Me.m_vData(0) = p_vValue Else Me.m_vData(0) = p_vValue End If End If End Sub Public Sub RemoveItem(p_iIndex As Integer) Dim vNewData As Variant Dim iIndex As Integer If Isarray(Me.m_vData) Then If p_iIndex <= Ubound(Me.m_vData) And p_iIndex > -1 Then iIndex = -1 Forall i In Me.m_vData iIndex = iIndex + 1 If iIndex <> p_iIndex Then If Isarray(vNewData) Then vNewData = Arrayappend(vNewData, i) Else Redim vNewData(0) If Isobject(i) Then Set vNewData(0) = i Else vNewData(0) = i End If End If End If End Forall Me.m_vData = vNewData If Isarray(Me.m_vData) Then Me.m_iCount = Ubound(Me.m_vData) + 1 Else Me.m_iCount = 0 End If End If End If End Sub Public Sub ReplaceItemValue(p_iIndex As Integer, p_vValue As Variant) If Isarray(Me.m_vData) Then If Ubound(Me.m_vData) <= p_iIndex Then If Isobject(p_vValue) Then Set Me.m_vData(p_iIndex) = p_vValue Else Me.m_vData(p_iIndex) = p_vValue End If End If End If End Sub End Class ----------ls.snapps.JSONObject-Script檔案---------------------- Option Public Option Declare 'use this library if you don't need the ability to convert the JSONObject to a JSON string %REM Copyright 2007, 2008, 2009 SNAPPS (Strategic Net Applications, Inc.) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. %END REM Class JSONObject '********************************************************************************************* '* Version: 1.0.3 '* Purpose: This class is a wrapper for an object in a JSON string '* '* Properties: Count: Returns the number of items in the JSONObject '* Items: Returns all items in the JSONObject '* '* Methods: AddItem(Value): '* Adds the value to the JSONObject '* GetItemValue(ItemName) '* Returns the value of the requested item '* RemoveItem(ItemName) '* Removes the value of the requested item '* ReplaceItemValue(Index, Value) '* Replaces the value in the specified array index '********************************************************************************************* Private m_vData List As Variant Private m_iCount As Integer Private REPLACE_CR(1) As String Private REPLACE_BLANK(1) As String Public Sub New Me.REPLACE_CR(0) = Chr(10) Me.REPLACE_CR(1) = Chr(13) Me.REPLACE_BLANK(0) = "" Me.REPLACE_BLANK(1) = "" End Sub Property Get Count As Integer Count = Me.m_iCount End Property Property Get Items As Variant Items = Me.m_vData End Property Public Sub AddItem(p_sName As String, p_vValue As Variant) Dim sName As String Me.m_iCount = Me.m_iCount + 1 'remove carriage returns sName = Replace(p_sName, Me.REPLACE_CR, Me.REPLACE_BLANK) If Isobject(p_vValue) Then Set Me.m_vData(sName) = p_vValue Else Me.m_vData(sName) = p_vValue End If End Sub Public Function GetItemValue(p_sName As String) As Variant If Iselement(Me.m_vData(p_sName)) Then If Isobject(Me.m_vData(p_sName)) Then Set GetItemValue = Me.m_vData(p_sName) Else GetItemValue = Me.m_vData(p_sName) End If End If End Function Public Sub RemoveItem(p_sName As String) If Iselement(Me.m_vData(p_sName)) Then If Me.m_iCount > 0 Then Me.m_iCount = m_iCount - 1 End If Erase Me.m_vData(p_sName) End If End Sub Public Sub ReplaceItemValue(p_sName As String, p_vValue As Variant) Call Me.AddItem(p_sName, p_vValue) End Sub End Class

相關推薦

LotusScript 呼叫WSDL 解析Json字串

END REM '************************************************* 'Globalization constants Const ERR_INVALID_JSON = "Invalid JSON format." Const ERR_MOVE_PAST_LA

SpringBoot整合Netty4實現JSON字串解析處理

一、maven配置 <!-- springboot版本 --> <parent> <groupId>org.springframework.boot<

遍歷win10文件夾解析json文件,按照json格式存入mongo數據庫(基於python 3.6)

dep IT os.path efault gpo dir ren ica not import reimport jsonfrom pymongo import MongoClientimport os# def Write_json(data):# open_J

jackson解析json字串,首字母大寫會自動轉為小寫

問題 樓主碰到的問題是,在實體類和表中定義的某個欄位為RMBPrice,首字母大寫,sql查詢出來的列名也是大寫的RMBPrice,但是使用jquery的datatables初始化列時,卻出錯。那一行的程式碼如下: {"name": "RMBPrice", "data": "RM

C++ 使用jsoncpp 封裝及解析 json字串(包含複雜陣列)

#include <json/json.h> #include <string> #include <iostream> using namespace std; int main() { //std::string strValue = "{\"na

C++ Jsoncpp 解析json字串

使用方法 下載原始碼解壓之後得到jsoncpp-src-0.5.0資料夾,我們只需要jsoncpp的標頭檔案和cpp檔案,其中jsonscpp的標頭檔案位於jsoncpp-src-0.5.0\include\json,jsoncpp的cpp檔案位於jsoncpp-src-0.5.0\sr

javascript中eval解析JSON字串

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

Power query解析json字串轉化為表格和將excel表格生成json格式字串

     今天講解一下在excel裡面利用Power query生成json格式的字串。在power query中處理json的函式有兩個。一個是Json.Document()函式,用於解析json字串,將其轉化為list或者record物件。這個在網抓的時候我們多用到

Boost ptree 解析json字串 多執行緒下程式crash

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

gson解析json字串

String retJson = HttpRequestUtil.sendGet1(url, auth, null); JsonParser parser = new JsonParser(); JsonObject ret = parser.parse(retJson).getAsJ

關於fastJson解析Json字串的問題: JSONException: exepct '[', but {

關於fastJson解析Json字串的問題。JSONException: exepct '[', but { 1種原因是字串中屬性沒有雙引號  如 [{a:1,b:c},{a:2,b:d}] 這樣會造成該錯誤。 應為:[{"a":1,"b":c},{"a":2,"b"

動態解析JSON字串,將資料存入資料庫

我在使用netty時候,由於不同裝置發出的JSON字串不一樣,我需要一個動態解析JSON字串方法去解決,我的思路是先將json字串通過gson這個類轉成map,由於在執行期間無法得知T的具體型別,對這個類的物件進行序列化和反序列化都不能正常進行。Gson通過藉助TypeTok

C# webapi 解析 json字串

步驟一:最好是自己建立一個和json包中欄位一樣的實體類接收資料(推薦),也可以用原有的實體類 using System; using System.Collections.Generic; using System.Linq; using System.Threading

java解析json字串

json現在也被作為一種主要的資料交換格式,不僅在網頁上能用還可以用到類似智慧手機這樣的裝置。和xml比起來雖然可讀性差了點,但是在傳輸的時候體積小,對於IOS裝置也比xml方便的多。 1.下面來看下這段json字串,生成這樣的字串可以使用JSON開發包也可以自己拼接字串

java解析json字串的應用

檔案alarmPub.txt中存在如下json串 {     "data": [         {             "oriId": "oid",             "alarmObj": "alarm obj",             "alarmObj

基於阿里fastJson解析json字串

1、json示例 { "pageSize":20, // 每頁顯示多少 "toPage":1, // 當前頁碼

Arduino構建與解析Json字串例項

目錄 Json目前在網路通訊中已經是一種非常常見的資料格式了,ArduinoJson庫的作用就是為了在Arduino中輕鬆實現對Json字串的解析和構建。加下來將介紹ArduinoJson

C#呼叫WebService解析返回的XML

string title = HttpUtility.UrlEncode(txtTitle.Text); string content = HttpUtility.UrlEncode(content1.Value); str

C#解析JSON字串總結

JSON檔案讀取到記憶體中就是字串,.NET操作JSON就是生成與解析JSON字串。 操作JSON通常有以下幾種方式: 1. 原始方式:按照JSON字串自己來解析。 2. 通用方式【★★★★★】:這種方式是使用開源的類庫Newtonsoft.Json(下載地址ht

HttpClient獲取解析JSON資料

package com.example.testjsonandget; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import j