Error at InvokeCode Activity

Hello Guys,

I am trying to use the following code:

If DicConfig Is Nothing Then
DicConfig = New System.Collections.Generic.Dictionary(Of String, Object)
Else
DicConfig.Clear
End If

Dim data As List(Of JToken) = jsonObject.Children().ToList

For Each item As JProperty In data
DicConfig.Add(item.Name, item.Value)
Next

But I am getting the following error:

“error BC30002: Type ‘JToken’ is not defined. At line 7”

Any ideas as of why I am getting that error?

Thanks in advance.
Luis V.

@luisvv93 What’s JToken?

Can you try giving the full context of the variable I mean, replace JToken as Newtonsoft.Json.Linq.JToken

Thanks for the replies guys,

It was Newtonsoft.Json.Linq.JObject, for some reason I just deleted it and put it again and it worked.

Thanks anyways,
Luis V.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.