Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6604515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:10:01+00:00 2026-05-25T19:10:01+00:00

am trying to consume json strings inside asp.net and google told me about this

  • 0

am trying to consume json strings inside asp.net and google told me about this Json.NET library.

I have the following json from a php webservice:

"[{\"AccountID\":\"demo\",\"UserID\":\"1\",\"Password\":\"*blank*\",\"Active\":\"1\",\"Name\":\"\"}][{\"AccountID\":\"demo\",\"UserID\":\"1\",\"Password\":\"*blank*\",\"Active\":\"1\",\"Name\":\"\"}]"

i found that the library cannot load urls so i had to use System.Net.WebClient; ok so far.
The problem is that doing

var json = webClient.DownloadString(url); //gives the json above               
object user = JsonConvert.DeserializeObject(json);
// or User user =JsonConvert.DeserializeObject<User>(json); wont work

wont work the library says “After parsing a value an unexpected character was encountered”

So, is my json malformed? i construct it with json_encode($resultset) from php, so i wonder whats going on.

my User object only has the properties i have on json.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:10:02+00:00Added an answer on May 25, 2026 at 7:10 pm

    First of all, your JSON string has double quotes around the whole result and a backslash before every other double quote. I’ll assume that this is an artifact from copying it out of the VisualStudio debugger (which displays it like this).

    If we remove these backslashes, we get the following JSON:

    [{"AccountID":"demo","UserID":"1","Password":"*blank*","Active":"1","Name":""}]
    [{"AccountID":"demo","UserID":"1","Password":"*blank*","Active":"1","Name":""}]
    

    These are two identical JSON arrays. But a valid JSON response consists of either a single JSON object or a single JSON array. This response is invalid.

    It’s seems that two JSON response where concatenated, resulting in an invalid construct.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to consume an ASP.NET Webservice from a Java application. The java app
I'm trying to use the JSON library to consume twitter information from the get
I'm trying to consume some .NET web services using JAX-WS. I have generated the
I'm trying to consume the json services from broadbandmap.gov so that I can display
I am trying to consume a .NET webservice with AJAX and want a JSON
I'm trying to consume an ASP.net Web service, and found a utility called WSDL2ObjC.
I'm trying to consume a .NET 2.0 web service using Axis. I generated the
I am trying to consume data from a webservice published by a 3rd party.
I'm getting XSS errors when trying to consume a .NET web service and I'm
So, I'm trying to consume a webservice using something like this: $client = new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.