I have a string with the following format
{data : [ "value 1", "value 2", "value 3"]}{data : [ "value 1", "value 2", "value 3"]}
and want to read this into aList(of String)
. Since I need this application to read many different strings all having the format from above but different length I cannot predefine a class to write this into (at least do I not know how to do this). So I want to write it into a List(of String).
What I have tried (according to this solution) is:
Dim jsonObj as Object = JsonConvert.DeserializeObject(Of Object)(allText)
where allText
is a string. But I get the error:
Newtonsoft.Json.JsonReaderException
HResult=0x80131500
Message=Additional text encountered after finished reading JSON content: ,. Path '', line 1, position 531.
Looking at 531
there is occuring ]}{
the first time. So I thought I can handel this with embracing everything into {}
as well but then I get the error:
Newtonsoft.Json.JsonReaderException
HResult=0x80131500
Message=Invalid property identifier character: {. Path '', line 1, position 1.
Could anyone tell me if the format of the Json is wrong and how to adjust it to overcome the error?
User contributions licensed under CC BY-SA 3.0