Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access JObject in index failed #797

Closed
Oceania2018 opened this issue Nov 5, 2020 · 1 comment · Fixed by #798
Closed

Access JObject in index failed #797

Oceania2018 opened this issue Nov 5, 2020 · 1 comment · Fixed by #798
Labels

Comments

@Oceania2018
Copy link

When I try to access vaue in items[0], it threw error below:
image

To reproduce:
make a json string like

{
  "items": [{"p1": 1}],
  "row": 1
}

Then use JObject.Parse(Response.Content) to get a JObject.

Below is my ugly fix, convert string "0" to int 0:
image

@lahma
Copy link
Collaborator

lahma commented Nov 6, 2020

  • need to add more logic to check for IList which is obvious choice
  • should also cache reflection search results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants