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 8641455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:31:47+00:00 2026-06-12T11:31:47+00:00

Hi every one when returning json data from webservice top tag is adding please

  • 0

Hi every one when returning json data from webservice top tag is adding please let me know how to remove top xml tag in the webservice
please let me know if any one this issue

i used the below method read

var obj = new List();

    //MakesInfo objMakes = new MakesInfo();
    MakesBL objMakesBL = new MakesBL();

    if (Session["Makes"] == null)
    {
        obj = (List<MakesInfo>)objMakesBL.GetMakes();
        Session["Makes"] = obj;
    }
    else
    {
        obj = (List<MakesInfo>)Session["Makes"];
    }
    StringBuilder str = new StringBuilder();


    //var oSerializer = new System.Web.Script.Serialization.JavaScriptSerializer();
    //string sJSON = oSerializer.Serialize(obj);

    //return sJSON;

    //yourobject is your actula object (may be collection) you want to serialize to json
    DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(List<MakesInfo>));


    //create a memory stream
    MemoryStream ms = new MemoryStream();
    //serialize the object to memory stream
    serializer.WriteObject(ms, obj);
    //convert the serizlized object to string
    string jsonString = Encoding.Default.GetString(ms.ToArray());
    //close the memory stream
    ms.Close();
    return jsonString;
  • 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-06-12T11:31:48+00:00Added an answer on June 12, 2026 at 11:31 am

    Use WCF just return list json object data is returned

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

Sidebar

Related Questions

every one i m new with ASP .net and I dont know how to
Hi every one actually I want to make a com.google.gson.JsonArray of data:[1,2,3,4,5].How can i
I'm returning some JSON from the web server, but I am unable to reference
Hello every One i am trying to get Ist date of All months in
Hi every One I am trying to add column in Mysql. My Sql Query
Hi every one I have these classe @Entity @Table(name = login, uniqueConstraints={@UniqueConstraint(columnNames={username_fk})}) public class
Hai every one I am developing an windows application in which i have to
hii every one, following is my code which displays 4 panel one is at
Hai every one, I am developing an application where users can subscribe or unsubscribe
Hai every one. How can I make the changes in the aumix permanently? I

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.