Your provided JSON can't be directly serialized as a list / array of KeyValuePair
s (the errors kinda speaks for themselves).
You could however use a "temporary" type and deserialize the provided JSON into that object and then convert it to a KeyValuePair.
For example, your "temporary" object could be something like this:
Class KeysDTO
Class KeyValue
Public Property Key As String
Public Property Value As String
End Class
Public Property Keys As List(Of KeyValue)
End Class
And your deserializing would be:
Dim serializer As New System.Web.Script.Serialization.JavaScriptSerializer()
Dim dto As KeysDTO = serializer.Deserialize(Of KeysDTO)(keys)
' If you really want an array of KeyValuePairs, you can do this then
Dim keyValuePairs = dto.Keys.Select(Function(kv) New KeyValuePair(Of String, String)(kv.Key, kv.Value)).ToArray()