question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot deserialize the current JSON object

See original GitHub issue

A new error arose: Cannot deserialize the current JSON object (e.g. {“name”:“value”}) into type ‘System.Collections.Generic.IList`1[System.Object]’ because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly. To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object. Path ‘[0].meta.amp_status’, line 1, position 1447.

_Originally posted by @Marneus77 in https://github.com/wp-net/WordPressPCL/issues/104#issuecomment-373396148_

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
ThomasPecommented, Nov 8, 2018

I’ve just published Version 1.6.0-beta1 to nuget, can you test with this package?

1reaction
ThomasPecommented, Nov 16, 2018

Awesome, great to hear!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot deserialize the current JSON object (e.g. {"name":"
As the error message is trying very hard to tell you, you can't deserialize a single object into a collection ( List<> )....
Read more >
Cannot deserialize the current JSON array. - Microsoft Q&A
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or...
Read more >
Cannot deserialize the current json object because(e.g. ...
Solution 2. JsonConvert. DeserializeObject<List<RootObject>>(json); You are deserialising the json into an array of RootObject objects, however ...
Read more >
Cannot deserialize the current JSON object (e.g. {"name":" ...
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is...
Read more >
[RESOLVED] Cannot deserialize the current JSON object
Hello, I get the error ("Cannot deserialize the current JSON object (e.g. {""name"":""value""}) into type 'System.Collections.Generic.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found