如何在jQuery 3.5中串行化這個數組結構?如何在asp.net 2008中使用json php數組結構
<?php
$response = array(
'file_version' => 2,
'files' =>
array(
array(
'file_name' => 'test1.exe',
'url' => 'http://127.0.0.1/heartkey/files/test1.exe',
'path' => 'images\filename\\'
),
array(
'file_name' => 'test2.exe',
'url' => 'http://127.0.0.1/heartkey/files/test2.exe',
'path' => 'images\filename\\'
),
array(
'file_name' => 'test3.exe',
'url' => 'http://127.0.0.1/heartkey/files/test3.exe',
'path' => 'images\filename\\'
)
),
'files_max_size' => 3000
);
$json = json_encode($response);
echo $json;
我發現基本方式,但我不知道如何表示,在VB中, 我用數組和嵌套的字典,但沒有運氣tryed。 我在vb.net的知識是最基本的。
這是我有:
Imports System.Web.Script.Serialization
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim info As Dictionary(Of String, Dictionary(Of String, String))
'info.Add("files", New Dictionary(Of String, String))
Dim serializer As New JavaScriptSerializer()
Dim serializedResult = serializer.Serialize(info)
Response.Write(serializedResult)
End Sub
End Class
您的PHP代碼編碼的對象一個JSON對象,是什麼 – ImadT