If model.Users
is of type Newtonsoft.Json.Linq.JArray
try to call:
string[] Users = model.Users.ToObject<string[]>()
Related Contents:
- Cannot deserialize the JSON array (e.g. [1,2,3]) into type ‘ ‘ because type requires JSON object (e.g. {“name”:”value”}) to deserialize correctly
- How to convert UTF-8 byte[] to string
- JSON.NET Error Self referencing loop detected for type
- How can I deserialize JSON with C#?
- Using C# to check if string contains a string in string array
- Deserializing JSON to .NET object using Newtonsoft (or LINQ to JSON maybe?)
- How to convert JSON to XML or XML to JSON?
- Convert JSON String to JSON Object c#
- Parse JSON in C#
- How to write a JSON file in C#?
- Checking if a string array contains a value, and if so, getting its position
- C# declare empty string array
- JSON.net: how to deserialize without using the default constructor?
- Unexpected character encountered while parsing value
- json.net has key method?
- Deserializing JSON data to C# using JSON.NET
- How do I enumerate through a JObject?
- Convert an array to string
- Is string in array?
- Convert JObject into Dictionary. Is it possible?
- string.Join on a List or other type
- Split and join C# string [duplicate]
- How to handle null/empty values in JsonConvert.DeserializeObject
- JContainer, JObject, JToken and Linq confusion
- Select last element quickly after a .Split()
- Returning anonymous types with Web API
- multiple JsonProperty Name assigned to single property
- int array to string
- Deserialize json with known and unknown fields
- Find and return JSON differences using newtonsoft in C#?
- Ignoring null fields in Json.net
- Detect if deserialized object is missing a field with the JsonConvert class in Json.NET
- NewtonSoft.Json Serialize and Deserialize class with property of type IEnumerable
- Can I specify a path in an attribute to map a property in my class to a child property in my JSON?
- How to convert JSON to XML or XML to JSON in C#?
- Generate JSON object with NewtonSoft in a single line
- Parsing a JSON array using Json.Net
- Is there a way to ignore get-only properties in Json.NET without using JsonIgnore attributes?
- Newtonsoft.Json SerializeObject without escape backslashes
- How to make JSON.NET StringEnumConverter use hyphen-separated casing
- How to parse huge JSON file as stream in Json.NET?
- Argument Exception when creating JObject
- Convert Json String to C# Object List
- Serialize an object directly to a JObject instead of to a string in json.net
- How to improve JSON deserialization speed in .Net? (JSON.net or other?)
- JSON.NET JObject key comparison case-insensitive
- Json Convert empty string instead of null
- Serialize/Deserialize a byte array in JSON.NET
- Accessing all items in the JToken
- Not ableTo Serialize Dictionary with Complex key using Json.net