2018-10-05 04:26:11 +08:00
|
|
|
|
Imports System.Runtime.CompilerServices
|
|
|
|
|
|
|
|
|
|
|
|
Namespace Serialization.JSON
|
2018-10-05 03:57:06 +08:00
|
|
|
|
|
|
|
|
|
|
''' <summary>
|
|
|
|
|
|
''' Extension helpers for deal with the anonymous type
|
|
|
|
|
|
''' </summary>
|
|
|
|
|
|
Public Module AnonymousJSONExtensions
|
|
|
|
|
|
|
2018-10-05 04:26:11 +08:00
|
|
|
|
<Extension>
|
|
|
|
|
|
Public Function GetJson(obj As String(,)) As String
|
|
|
|
|
|
With New Dictionary(Of String, String)
|
|
|
|
|
|
For Each prop As String() In obj.RowIterator
|
|
|
|
|
|
Call .Add(prop(0), prop(1))
|
|
|
|
|
|
Next
|
|
|
|
|
|
|
|
|
|
|
|
Return .GetJson
|
|
|
|
|
|
End With
|
|
|
|
|
|
End Function
|
2018-10-05 03:57:06 +08:00
|
|
|
|
End Module
|
|
|
|
|
|
End Namespace
|