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

  • SEARCH
  • Home
  • 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 262755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:32:39+00:00 2026-05-11T22:32:39+00:00

I am using json.net to parse objects and delivering them to a webservice I

  • 0

I am using json.net to parse objects and delivering them to a webservice I have made. The objects are LINQ-objects. When I access this webservice with JQuery, it doesn’t parse the JSON correctly. There seems to be something wrong with the formatting..

The JSON-string I get is this one:

[{"typeid":1,
  "typename":"binders",
  "description":"test",
  "RESOURCEs":
    [{"resourceid":4,
      "resourcename":"Binders 1",
      "description":"Pakke med hele fire binders!!!",
      "typeid":1,
      "RESERVATIONLINEs":[]
     },    
     {"resourceid":10,
      "resourcename":"xxx",
      "description":"xxx",
      "typeid":1,
      "RESERVATIONLINEs":[]
     }
    ]
 },
 {"typeid":2,
  "typename":"blyant",
  "description":"også dyrt",
  "RESOURCEs":
    [{"resourceid":5,
      "resourcename":"Gråblyant 1",
      "description":"Fin og grå",
      "typeid":2,
      "RESERVATIONLINEs":[]
     },
     {"resourceid":6,
      "resourcename":"Rødblyant 1",
      "description":"Må spisses ofte",
      "typeid":2,
      "RESERVATIONLINEs":[]
     }
    ]
 },
 {"typeid":4,
  "typename":"Penn",
  "description":"tester",
  "RESOURCEs":
    [{"resourceid":7,
      "resourcename":"Penn 1",
      "description":"Blå og fin",
      "typeid":4,
      "RESERVATIONLINEs":[]
     },
     {"resourceid":11,
      "resourcename":"xxx",
      "description":"xxx",
      "typeid":4,
      "RESERVATIONLINEs":[]
     }
    ]
 },
 {"typeid":5,
  "typename":"Kajakk",
  "description":"Dette er en type båt",
  "RESOURCEs":
    [{"resourceid":1,
      "resourcename":"Havkajakk 1",
      "description":"FOr havbruk",
      "typeid":5,
      "RESERVATIONLINEs":[]
     },
     {"resourceid":2,
      "resourcename":"Havkajakk 2",
      "description":"For havbruk",
      "typeid":5,
      "RESERVATIONLINEs":[]
     }
    ]
 },
 {"typeid":6,
  "typename":"3G-modem",
  "description":"Fra NetCom",
  "RESOURCEs":
    [{"resourceid":3,
      "resourcename":"3G-modem 1",
      "description":"Gammelt og ustabilg",
      "typeid":6,
      "RESERVATIONLINEs":[]
     },
     {"resourceid":12,
      "resourcename":"xxx",
      "description":"xxx",
      "typeid":6,
      "RESERVATIONLINEs":[]
     }
    ]
 },
 {"typeid":7,
  "typename":"Minnepinne",
  "description":"på 1 KB",
  "RESOURCEs":
    [{"resourceid":8,
      "resourcename":"Minnepinne 1",
      "description":"1 KB (!)",
      "typeid":7,
      "RESERVATIONLINEs":[]
     },
     {"resourceid":9,
      "resourcename":"Minnepinne 2",
      "description":"20 PB",
      "typeid":7,
      "RESERVATIONLINEs":[]
     }
    ]
 }]

Anyone have a clue why this is not working?

  • 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-11T22:32:39+00:00Added an answer on May 11, 2026 at 10:32 pm

    The actual problem here was that this JSON was embedded in a XML-tag. I solved the problem by parsing the JSON-string by using this parser: http://www.json.org/js.html

    Of cource this is not ideal, as JQuery should do this for me, but until I find a way for .NET-webservices to return the raw JSON-string, not embedded in a XML-tag, this solution works =)

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

Sidebar

Related Questions

I'm trying to parse some JSON using the JSon.Net library. The documentation seems a
How do you return a serialized JSON object to the client side using ASP.NET
I am trying to parse JSON in an Adobe Flex app, using http://www.mikechambers.com/blog/2006/03/28/tutorial-using-json-with-flex-2-and-actionscript-3/'>This Tutorial
PHP5.2.x back end. The text data transfer is using JSON objects. Am looking at
I am currently using Django to construct JSON encoded objects which a retrieved using
Problem: jQuery DataTables server-side processing using ASP.NET WebForms. Solution: Darin Dimitrov answered the question
Has anyone got a RESTful WCF service (in .NET4) successfully using JSON.NET to do
It seems impossible to (de-)serialize a generic dictionary using Json.NET out of the box.
Possible Duplicate: Converting XML to JSON using Python? I am importing an XML feed
I am developing some client side Javascript that is using some JSON web services

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.